From 1562c88ea71a0f56033553016682a51bc019d590 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Jan 2025 20:07:40 +0800 Subject: [PATCH] Improve context menu item action response --- Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++++ Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 1 + Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 ++ 3 files changed, 7 insertions(+) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 55bc8d1b3..b12e97e0b 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1273,6 +1273,8 @@ namespace Flow.Launcher.ViewModel { _topMostRecord.Remove(result); App.API.ShowMsg(InternationalizationManager.Instance.GetTranslation("success")); + App.API.BackToQueryResults(); + App.API.ReQuery(); return false; } }; @@ -1289,6 +1291,8 @@ namespace Flow.Launcher.ViewModel { _topMostRecord.AddOrUpdate(result); App.API.ShowMsg(InternationalizationManager.Instance.GetTranslation("success")); + App.API.BackToQueryResults(); + App.API.ReQuery(); return false; } }; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index feccc74c8..3f3b7cb58 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -242,6 +242,7 @@ namespace Flow.Launcher.Plugin.Explorer var name = "Plugin: Folder"; var message = $"File not found: {e.Message}"; Context.API.ShowMsgError(name, message); + return false; } return true; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 00b97e114..6ba7047f2 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -264,6 +264,8 @@ namespace Flow.Launcher.Plugin.Program Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), Context.API.GetTranslation( "flowlauncher_plugin_program_disable_dlgtitle_success_message")); + Context.API.BackToQueryResults(); + Context.API.ReQuery(); return false; }, IcoPath = "Images/disable.png",