Fix logic for imagepath and delegate

This commit is contained in:
Vic 2022-12-28 21:45:30 +08:00
parent 617d2f5efb
commit 35d96bde84

View file

@ -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);