From 1c6d207595c941c8bfa3d99a12d7e5c208ffe007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Mon, 24 May 2021 10:34:16 +0800 Subject: [PATCH] only modify property when async (avoid duplicate read) --- 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 dd4b351c3..791aa6da9 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -59,7 +59,7 @@ namespace Flow.Launcher.ViewModel { try { - Image = Result.Icon(); + image = Result.Icon(); return; } catch (Exception e) @@ -71,7 +71,7 @@ namespace Flow.Launcher.ViewModel if (ImageLoader.CacheContainImage(imagePath)) { // will get here either when icoPath has value\icon delegate is null\when had exception in delegate - Image = ImageLoader.Load(imagePath); + image = ImageLoader.Load(imagePath); return; }