change the way of checking whether cache exist

This commit is contained in:
弘韬 张 2020-11-16 13:04:16 +08:00
parent d9ef68272b
commit 71cac9cb23
2 changed files with 2 additions and 3 deletions

View file

@ -79,8 +79,7 @@ namespace Flow.Launcher.Infrastructure.Image
public bool ContainsKey(string key)
{
var contains = Data.ContainsKey(key) && Data[key] != null;
return contains;
return Data.ContainsKey(key) && Data[key].imageSource != null;
}
public int CacheSize()

View file

@ -216,7 +216,7 @@ namespace Flow.Launcher.Infrastructure.Image
public static bool CacheContainImage(string path)
{
return ImageCache.ContainsKey(path) && ImageCache[path] != null;
return ImageCache.ContainsKey(path);
}