Skip to content

Commit 120b7c7

Browse files
Merge pull request #3104 from NoPlagiarism/image_data_uri
Return data uri image as icon support
2 parents 14f1a5a + 0b0ead1 commit 120b7c7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Flow.Launcher.Infrastructure/Image/ImageLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private static async ValueTask<ImageResult> LoadInternalAsync(string path, bool
139139
return new ImageResult(image, ImageType.ImageFile);
140140
}
141141

142-
if (path.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
142+
if (path.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
143143
{
144144
var imageSource = new BitmapImage(new Uri(path));
145145
imageSource.Freeze();

Flow.Launcher.Plugin/Result.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public string IcoPath
7070
&& !string.IsNullOrEmpty(PluginDirectory)
7171
&& !Path.IsPathRooted(value)
7272
&& !value.StartsWith("http://", StringComparison.OrdinalIgnoreCase)
73-
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
73+
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
74+
&& !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
7475
{
7576
_icoPath = Path.Combine(PluginDirectory, value);
7677
}

0 commit comments

Comments
 (0)