Merge ImageCache change

This commit is contained in:
弘韬 张 2020-11-28 13:29:55 +08:00
commit 6b9622844c

View file

@ -65,13 +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
.Where(x => x.Key != Constant.MissingImgIcon
&& x.Key != Constant.DefaultIcon)
.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key))
{
foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key))
Data.TryRemove(key, out _);
}
}
}
}