From 35d96bde849d63a9812d46fdf3152b666d82ef3d Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Wed, 28 Dec 2022 21:45:30 +0800 Subject: [PATCH] Fix logic for imagepath and delegate --- 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 f23937345..1b127a386 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -227,8 +227,8 @@ namespace Flow.Launcher.ViewModel private async Task LoadPreviewImageAsync() { - var imagePath = string.IsNullOrEmpty(Result.Preview.PreviewImagePath) ? Result.IcoPath : Result.Preview.PreviewImagePath; - var iconDelegate = Result.Icon ?? Result.Preview.PreviewDelegate; + var imagePath = Result.Preview.PreviewImagePath ?? Result.IcoPath; + var iconDelegate = Result.Preview.PreviewDelegate ?? Result.Icon; if (ImageLoader.CacheContainImage(imagePath, true)) { previewImage = await LoadImageInternalAsync(imagePath, iconDelegate, true).ConfigureAwait(false);