From 441d4cb17387091a3d22caeb6b9cf1048490bc79 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sun, 23 Apr 2023 19:50:44 +0800 Subject: [PATCH] Configure await for QuickLook calls --- Flow.Launcher/ViewModel/MainViewModel.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 9198759dc..b70d15d45 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -610,11 +610,11 @@ namespace Flow.Launcher.ViewModel { if (!ExternalPreviewOpen) { - _ = OpenQuickLookPreviewAsync(path); + _ = OpenQuickLookPreviewAsync(path).ConfigureAwait(false); } else { - _ = CloseQuickLookPreviewAsync(); + _ = CloseQuickLookPreviewAsync().ConfigureAwait(false); } } @@ -652,12 +652,12 @@ namespace Flow.Launcher.ViewModel // Should use external preview for selected result if (ExternalPreviewOpen) { - _ = ToggleQuickLookPreviewAsync(path, true); + _ = ToggleQuickLookPreviewAsync(path, true).ConfigureAwait(false); } else if(PreviewVisible) { // When internal is open and select a result that should use external preview - _ = OpenQuickLookPreviewAsync(path); + _ = OpenQuickLookPreviewAsync(path).ConfigureAwait(false); HideInternalPreview(); } } @@ -670,7 +670,7 @@ namespace Flow.Launcher.ViewModel else if (ExternalPreviewOpen) { // When external is open and select a result that can't use external preview - _ = CloseQuickLookPreviewAsync(); + _ = CloseQuickLookPreviewAsync().ConfigureAwait(false); ShowInternalPreview(); } } @@ -1114,7 +1114,7 @@ namespace Flow.Launcher.ViewModel if (ExternalPreviewOpen) { - _ = CloseQuickLookPreviewAsync(); + _ = CloseQuickLookPreviewAsync().ConfigureAwait(false); } if (!SelectedIsFromQueryResults())