Skip to content

Commit ac945f4

Browse files
committed
revert unneeded condition on Constant.MissingImgIcon
1 parent efcb6a7 commit ac945f4

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Flow.Launcher.Infrastructure/Image/ImageCache.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ public ImageSource this[string path]
6666
{
6767
// To delete the images from the data dictionary based on the resizing of the Usage Dictionary.
6868

69-
foreach (var key in Data.Where(x => x.Key != Constant.MissingImgIcon)
70-
.OrderBy(x => x.Value.usage)
71-
.Take(Data.Count - MaxCached)
72-
.Select(x => x.Key))
69+
foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key))
7370
{
7471
if (!(key.Equals(Constant.ErrorIcon) || key.Equals(Constant.DefaultIcon)))
7572
{

Flow.Launcher/ViewModel/ResultViewModel.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ public ResultViewModel(Result result, Settings settings)
5353
if (result != null)
5454
{
5555
Result = result;
56-
Image = new LazyAsync<ImageSource>(SetImage, ImageLoader.DefaultImage, () =>
57-
{
58-
OnPropertyChanged(nameof(Image));
59-
});
56+
57+
Image = new LazyAsync<ImageSource>(
58+
SetImage,
59+
ImageLoader.DefaultImage,
60+
() =>
61+
{
62+
OnPropertyChanged(nameof(Image));
63+
});
6064
}
6165

6266
Settings = settings;

0 commit comments

Comments
 (0)