From 1dbc061c2c987a076ee29ba44bc00d7796a4efcb Mon Sep 17 00:00:00 2001 From: SysC0mp Date: Fri, 1 May 2020 11:56:30 +0200 Subject: [PATCH] Remove parallel loading of icons This is causing null exceptions on Wox startup and will lead to thumbnails not loaded at all. --- Flow.Launcher.Infrastructure/Image/ImageLoader.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 873eb306e..0b23f030f 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -48,10 +48,10 @@ namespace Flow.Launcher.Infrastructure.Image { Stopwatch.Normal("|ImageLoader.Initialize|Preload images cost", () => { - ImageCache.Usage.AsParallel().ForAll(x => + foreach (string key in _imageCache.Usage.Keys) { - Load(x.Key); - }); + Load(key); + } }); Log.Info($"|ImageLoader.Initialize|Number of preload images is <{ImageCache.Usage.Count}>, Images Number: {ImageCache.CacheSize()}, Unique Items {ImageCache.UniqueImagesInCache()}"); });