revert unneeded condition on Constant.MissingImgIcon

This commit is contained in:
Jeremy Wu 2020-11-27 07:04:39 +11:00
parent efcb6a7833
commit ac945f4814
2 changed files with 9 additions and 8 deletions

View file

@ -66,10 +66,7 @@ namespace Flow.Launcher.Infrastructure.Image
{
// 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)
.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))
{
if (!(key.Equals(Constant.ErrorIcon) || key.Equals(Constant.DefaultIcon)))
{

View file

@ -53,10 +53,14 @@ namespace Flow.Launcher.ViewModel
if (result != null)
{
Result = result;
Image = new LazyAsync<ImageSource>(SetImage, ImageLoader.DefaultImage, () =>
{
OnPropertyChanged(nameof(Image));
});
Image = new LazyAsync<ImageSource>(
SetImage,
ImageLoader.DefaultImage,
() =>
{
OnPropertyChanged(nameof(Image));
});
}
Settings = settings;