Skip to content

Commit 4856399

Browse files
Make IconDelegate async when calling it
1 parent 5a7eb62 commit 4856399

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Flow.Launcher/ViewModel/ResultViewModel.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private async Task LoadImageAsync()
180180
{
181181
try
182182
{
183-
image = Result.Icon();
183+
Image = await Task.Run(() => Result.Icon()).ConfigureAwait(false);
184184
return;
185185
}
186186
catch (Exception e)
@@ -210,9 +210,7 @@ private async Task LoadPreviewImageAsync()
210210
var imagePath = Result.PreviewImage ?? Result.IcoPath;
211211
if (imagePath == null && Result.Icon != null)
212212
{
213-
// For UWP programs from program plugin
214-
// TODO: Consider https://github.com/Flow-Launcher/Flow.Launcher/pull/1492#issuecomment-1304829947
215-
PreviewImage = Result.Icon();
213+
PreviewImage = await Task.Run(() => Result.Icon()).ConfigureAwait(false);
216214
}
217215
else
218216
{

0 commit comments

Comments
 (0)