From 8da88bd22a41f42a23e03f9d1fa91dcad971e378 Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:29:19 +0800 Subject: [PATCH] Hide fail toast for closing --- Flow.Launcher/Helper/QuickLookHelper.cs | 6 +----- Flow.Launcher/ViewModel/MainViewModel.cs | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher/Helper/QuickLookHelper.cs b/Flow.Launcher/Helper/QuickLookHelper.cs index 85682b1d6..cc1e8d63f 100644 --- a/Flow.Launcher/Helper/QuickLookHelper.cs +++ b/Flow.Launcher/Helper/QuickLookHelper.cs @@ -41,13 +41,9 @@ namespace Flow.Launcher.Helper return success; } - public static async Task CloseQuickLookAsync(bool sendFailToast = true) + public static async Task CloseQuickLookAsync() { bool success = await SendQuickLookPipeMsgAsync(pipeMessageClose); - if (sendFailToast && !success) - { - ShowQuickLookUnavailableToast(); - } return success; } diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index af50954a6..050b9ff09 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -632,9 +632,9 @@ namespace Flow.Launcher.ViewModel } } - private async Task CloseExternalPreviewAsync(bool sendFailToast = true) + private async Task CloseExternalPreviewAsync() { - bool success = await QuickLookHelper.CloseQuickLookAsync(sendFailToast).ConfigureAwait(false); + bool success = await QuickLookHelper.CloseQuickLookAsync().ConfigureAwait(false); if (success) { ExternalPreviewOpen = false; @@ -1105,7 +1105,7 @@ namespace Flow.Launcher.ViewModel MainWindowOpacity = 0; if (Settings.UseExternalPreview) - _ = CloseExternalPreviewAsync(false); + _ = CloseExternalPreviewAsync(); if (!SelectedIsFromQueryResults()) {