remove task.run outside

This commit is contained in:
Hongtao Zhang 2022-11-24 14:18:31 -06:00
parent 83ec8099a7
commit 303d3b9754
No known key found for this signature in database
GPG key ID: 75F655B91C7AC9BB

View file

@ -15,7 +15,7 @@ namespace Flow.Launcher.ViewModel
public class ResultViewModel : BaseModel
{
private static PrivateFontCollection fontCollection = new();
private static Dictionary<string, string> fonts = new();
private static Dictionary<string, string> 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;
}