Try to load full image from cache first

This commit is contained in:
Garulf 2022-09-02 07:39:32 -04:00
parent a76304ac51
commit a9d11816f5

View file

@ -110,14 +110,15 @@ namespace Flow.Launcher.Infrastructure.Image
{
return new ImageResult(ImageCache[Constant.MissingImgIcon], ImageType.Error);
}
if (ImageCache.ContainsKey(path))
{
return new ImageResult(ImageCache[path], ImageType.Cache);
}
if (loadFullImage && ImageCache.ContainsKey(path + ImageType.FullImageFile))
{
return new ImageResult(ImageCache[path + ImageType.FullImageFile], ImageType.Cache);
}
if (ImageCache.ContainsKey(path))
{
return new ImageResult(ImageCache[path], ImageType.Cache);
}
if (path.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
{
var imageSource = new BitmapImage(new Uri(path));