From 303d3b97541715af83a2fd02d8209c49cfbffb88 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 24 Nov 2022 14:18:31 -0600 Subject: [PATCH] remove task.run outside --- Flow.Launcher/ViewModel/ResultViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index d12a765ae..282c45f46 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -15,7 +15,7 @@ namespace Flow.Launcher.ViewModel public class ResultViewModel : BaseModel { private static PrivateFontCollection fontCollection = new(); - private static Dictionary fonts = new(); + private static Dictionary fonts = new(); public ResultViewModel(Result result, Settings settings) { @@ -173,7 +173,7 @@ namespace Flow.Launcher.ViewModel } // We need to modify the property not field here to trigger the OnPropertyChanged event - var i = await Task.Run(async () => await ImageLoader.LoadAsync(imagePath, loadFullImage)); + var i = await ImageLoader.LoadAsync(imagePath, loadFullImage); Image = i; }