Skip to content

Commit 6617d03

Browse files
authored
Merge pull request #222 from Flow-Launcher/allow_missing_default_img_dict_remove
Allow MissingImgIcon and DefaultIcon to be removed from image cache
2 parents 2608d96 + f20c721 commit 6617d03

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Flow.Launcher.Infrastructure/Image/ImageCache.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,8 @@ public ImageSource this[string path]
6565
if (Data.Count > permissibleFactor * MaxCached)
6666
{
6767
// To delete the images from the data dictionary based on the resizing of the Usage Dictionary.
68-
6968
foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key))
70-
{
71-
if (!(key.Equals(Constant.ErrorIcon) || key.Equals(Constant.DefaultIcon)))
72-
{
73-
Data.TryRemove(key, out _);
74-
}
75-
}
69+
Data.TryRemove(key, out _);
7670
}
7771
}
7872
}

0 commit comments

Comments
 (0)