Skip to content

Commit

Permalink
[Result] return data uri image support
Browse files Browse the repository at this point in the history
  • Loading branch information
NoPlagiarism committed Dec 2, 2024
1 parent 14f1a5a commit 0b0ead1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Flow.Launcher.Infrastructure/Image/ImageLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private static async ValueTask<ImageResult> LoadInternalAsync(string path, bool
return new ImageResult(image, ImageType.ImageFile);
}

if (path.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
if (path.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
{
var imageSource = new BitmapImage(new Uri(path));
imageSource.Freeze();
Expand Down
3 changes: 2 additions & 1 deletion Flow.Launcher.Plugin/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public string IcoPath
&& !string.IsNullOrEmpty(PluginDirectory)
&& !Path.IsPathRooted(value)
&& !value.StartsWith("http://", StringComparison.OrdinalIgnoreCase)
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
&& !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
{
_icoPath = Path.Combine(PluginDirectory, value);
}
Expand Down

0 comments on commit 0b0ead1

Please sign in to comment.