allow MissingImgIcon and DefaultIcon to be removed from image cache

This commit is contained in:
Jeremy Wu 2020-11-27 13:12:09 +11:00
parent 2608d961d0
commit f20c721ad1

View file

@ -65,14 +65,8 @@ namespace Flow.Launcher.Infrastructure.Image
if (Data.Count > permissibleFactor * MaxCached)
{
// To delete the images from the data dictionary based on the resizing of the Usage Dictionary.
foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key))
{
if (!(key.Equals(Constant.ErrorIcon) || key.Equals(Constant.DefaultIcon)))
{
Data.TryRemove(key, out _);
}
}
Data.TryRemove(key, out _);
}
}
}