Skip to content

Commit a40e15f

Browse files
Remove duplicate null check
null check is done in ContainsKey()
1 parent b5c4805 commit a40e15f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Flow.Launcher.Infrastructure/Image/ImageCache.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
using System;
1+
using System;
22
using System.Collections.Concurrent;
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Threading;
6-
using System.Threading.Tasks;
76
using System.Windows.Media;
87

98
namespace Flow.Launcher.Infrastructure.Image

Flow.Launcher.Infrastructure/Image/ImageLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ private static BitmapSource GetThumbnail(string path, ThumbnailOptions option =
248248

249249
public static bool CacheContainImage(string path, bool loadFullImage = false)
250250
{
251-
return ImageCache.ContainsKey(path, loadFullImage) && ImageCache[path, loadFullImage] != null;
251+
return ImageCache.ContainsKey(path, loadFullImage);
252252
}
253253

254254
public static async ValueTask<ImageSource> LoadAsync(string path, bool loadFullImage = false)

0 commit comments

Comments
 (0)