Init ImageCache from disk

This commit is contained in:
Vic 2023-04-24 22:58:32 +08:00
parent eaae3b9ee3
commit 07c1a0b5a3
2 changed files with 3 additions and 1 deletions

View file

@ -28,7 +28,7 @@ namespace Flow.Launcher.Infrastructure.Image
private const int permissibleFactor = 2;
private SemaphoreSlim semaphore = new(1, 1);
public void Initialization(Dictionary<(string, bool), int> usage)
public void Initialize(Dictionary<(string, bool), int> usage)
{
foreach (var key in usage.Keys)
{

View file

@ -40,6 +40,8 @@ namespace Flow.Launcher.Infrastructure.Image
var usage = LoadStorageToConcurrentDictionary();
ImageCache.Initialize(usage.ToDictionary(x => x.Key, x => x.Value));
foreach (var icon in new[]
{
Constant.DefaultIcon, Constant.MissingImgIcon