From b80b4a6de7a42200d8fb71ac4de9db53968c9fb7 Mon Sep 17 00:00:00 2001 From: Xiangyun Zheng <12412416@mail.sustech.edu.cn> Date: Fri, 24 Apr 2026 02:06:13 +0800 Subject: [PATCH 01/10] Add setting to disable non-error notifications --- .../UserSettings/Settings.cs | 1 + Flow.Launcher/Languages/en.xaml | 2 ++ Flow.Launcher/PublicAPIInstance.cs | 12 ++++++++++++ .../SettingPages/Views/SettingsPaneGeneral.xaml | 10 ++++++++++ 4 files changed, 25 insertions(+) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 7524d6c1a79..0b398df9676 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -462,6 +462,7 @@ public bool KeepMaxResults public bool DontPromptUpdateMsg { get; set; } public bool EnableUpdateLog { get; set; } + public bool DisableSuccessNotifications { get; set; } public bool StartFlowLauncherOnSystemStartup { get; set; } = false; public bool UseLogonTaskForStartup { get; set; } = false; diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 729146a435d..9deb23acdc5 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -125,6 +125,8 @@ Flow Launcher search window is hidden in the tray after starting up. Hide tray icon When the icon is hidden from the tray, the Settings menu can be opened by right-clicking on the search window. + Disable notifications (non-error) + Hide non-error notifications shown after actions (e.g. copy completed). Error notifications are still shown. Query Search Precision Changes minimum match score required for results. None diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 5cefd2298cb..acd88cc13c1 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -129,6 +129,12 @@ public void ShowMsg(string title, string subTitle = "", string iconPath = "") => public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true) { + if (_settings.DisableSuccessNotifications && + !string.Equals(iconPath, Constant.ErrorIcon, StringComparison.OrdinalIgnoreCase)) + { + return; + } + Notification.Show(title, subTitle, iconPath); } @@ -137,6 +143,12 @@ public void ShowMsgWithButton(string title, string buttonText, Action buttonActi public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle, string iconPath, bool useMainWindowAsOwner = true) { + if (_settings.DisableSuccessNotifications && + !string.Equals(iconPath, Constant.ErrorIcon, StringComparison.OrdinalIgnoreCase)) + { + return; + } + Notification.ShowWithButton(title, buttonText, buttonAction, subTitle, iconPath); } diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml index 38a0e429f68..791f65b8555 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml @@ -92,6 +92,16 @@ OnContent="{DynamicResource enable}" /> + + + + Date: Sun, 26 Apr 2026 14:17:29 +0800 Subject: [PATCH 02/10] change the option to EnableSuccessNotification --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 4 ++-- Flow.Launcher/Languages/en.xaml | 4 ++-- Flow.Launcher/PublicAPIInstance.cs | 6 +++--- Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 0b398df9676..1db18813af5 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text.Json.Serialization; using System.Windows; @@ -462,7 +462,7 @@ public bool KeepMaxResults public bool DontPromptUpdateMsg { get; set; } public bool EnableUpdateLog { get; set; } - public bool DisableSuccessNotifications { get; set; } + public bool EnableSuccessNotification { get; set; } = true; public bool StartFlowLauncherOnSystemStartup { get; set; } = false; public bool UseLogonTaskForStartup { get; set; } = false; diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 9deb23acdc5..56d72feac16 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -125,8 +125,8 @@ Flow Launcher search window is hidden in the tray after starting up. Hide tray icon When the icon is hidden from the tray, the Settings menu can be opened by right-clicking on the search window. - Disable notifications (non-error) - Hide non-error notifications shown after actions (e.g. copy completed). Error notifications are still shown. + Enable success notifications + Show non-error notifications after actions (e.g. copy completed). Error notifications are always shown. Query Search Precision Changes minimum match score required for results. None diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index acd88cc13c1..eeb7f30c90d 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Specialized; @@ -129,7 +129,7 @@ public void ShowMsg(string title, string subTitle = "", string iconPath = "") => public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true) { - if (_settings.DisableSuccessNotifications && + if (!_settings.EnableSuccessNotification && !string.Equals(iconPath, Constant.ErrorIcon, StringComparison.OrdinalIgnoreCase)) { return; @@ -143,7 +143,7 @@ public void ShowMsgWithButton(string title, string buttonText, Action buttonActi public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle, string iconPath, bool useMainWindowAsOwner = true) { - if (_settings.DisableSuccessNotifications && + if (!_settings.EnableSuccessNotification && !string.Equals(iconPath, Constant.ErrorIcon, StringComparison.OrdinalIgnoreCase)) { return; diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml index 791f65b8555..08cf85ff64c 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml @@ -94,10 +94,10 @@ + Description="{DynamicResource enableSuccessNotificationToolTip}" + Header="{DynamicResource enableSuccessNotification}"> From 468d52a04c72df2906838babbc36b8d9d7d417eb Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:02:04 +0800 Subject: [PATCH 03/10] Update notification setting text for clarity Clarified the "enableSuccessNotification" label to indicate it enables all non-error notifications, not just success notifications. --- Flow.Launcher/Languages/en.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 56d72feac16..f92a51bb324 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -125,8 +125,8 @@ Flow Launcher search window is hidden in the tray after starting up. Hide tray icon When the icon is hidden from the tray, the Settings menu can be opened by right-clicking on the search window. - Enable success notifications - Show non-error notifications after actions (e.g. copy completed). Error notifications are always shown. + Show more notifications + Show more notifications after some actions (e.g. copy completed). When disabled, only error and important information notifications are shown. Query Search Precision Changes minimum match score required for results. None From 28ac9291e2c1061950db080182e3e34fe58f2a9a Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:10:47 +0800 Subject: [PATCH 04/10] Add forceShown param to ShowMsg and refactor notifications Added forceShown to ShowMsg in IPublicAPI and updated PublicAPIInstance to support forced notifications. Error messages now always show regardless of user settings. Simplified ShowMsgWithButton to always display. Changed _saveSettingsLock to Lock type and made minor formatting improvements. --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 11 +++++++- Flow.Launcher/PublicAPIInstance.cs | 27 +++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index c7d3e49869f..4d0f520f8af 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -136,6 +136,16 @@ public interface IPublicAPI /// when true will use main windows as the owner void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true); + /// + /// Show message box + /// + /// Message title + /// Message subtitle + /// Message icon path (relative path to your plugin folder) + /// when true will use main windows as the owner + /// when true will force the message to be shown regardless of user settings of `Show more notifications` + void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true, bool forceShown = false); + /// /// Show message box with button /// @@ -162,7 +172,6 @@ public interface IPublicAPI /// void OpenSettingDialog(); - /// /// Open plugin setting window for a specific plugin. /// Reuses the existing window when that plugin's settings window is already open. diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index eeb7f30c90d..72f04f9803e 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Specialized; @@ -53,7 +53,7 @@ public class PublicAPIInstance : IPublicAPI, IRemovable private Updater _updater; private Updater Updater => _updater ??= Ioc.Default.GetRequiredService(); - private readonly object _saveSettingsLock = new(); + private readonly Lock _saveSettingsLock = new(); #region Constructor @@ -119,17 +119,20 @@ public void SaveAppAllSettings() public Task ReloadAllPluginData() => PluginManager.ReloadDataAsync(); public void ShowMsgError(string title, string subTitle = "") => - ShowMsg(title, subTitle, Constant.ErrorIcon, true); + ShowMsg(title, subTitle, Constant.ErrorIcon, forceShown:true); public void ShowMsgErrorWithButton(string title, string buttonText, Action buttonAction, string subTitle = "") => - ShowMsgWithButton(title, buttonText, buttonAction, subTitle, Constant.ErrorIcon, true); + ShowMsgWithButton(title, buttonText, buttonAction, subTitle, Constant.ErrorIcon); public void ShowMsg(string title, string subTitle = "", string iconPath = "") => - ShowMsg(title, subTitle, iconPath, true); + ShowMsg(title, subTitle, iconPath); - public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true) + public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true) => + ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner:useMainWindowAsOwner); + + public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true, bool forceShown = false) { - if (!_settings.EnableSuccessNotification && + if (!forceShown && !_settings.EnableSuccessNotification && !string.Equals(iconPath, Constant.ErrorIcon, StringComparison.OrdinalIgnoreCase)) { return; @@ -139,16 +142,10 @@ public void ShowMsg(string title, string subTitle, string iconPath, bool useMain } public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle = "", string iconPath = "") => - ShowMsgWithButton(title, buttonText, buttonAction, subTitle, iconPath, true); + ShowMsgWithButton(title, buttonText, buttonAction, subTitle, iconPath); public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle, string iconPath, bool useMainWindowAsOwner = true) - { - if (!_settings.EnableSuccessNotification && - !string.Equals(iconPath, Constant.ErrorIcon, StringComparison.OrdinalIgnoreCase)) - { - return; - } - + { Notification.ShowWithButton(title, buttonText, buttonAction, subTitle, iconPath); } From 2ff135d5f98fe88bf879ddd48ce25fc7ce47a156 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:11:27 +0800 Subject: [PATCH 05/10] Add ShowMsg overload with forceShown parameter Added a new overload of the ShowMsg method in JsonRPCPublicAPI to support a forceShown parameter, enabling callers to control whether the message is forcibly displayed. This overload delegates to the underlying _api.ShowMsg with the new argument. --- .../Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs index 9d6174eb7ee..249eeac9757 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs @@ -89,6 +89,11 @@ public void ShowMsg(string title, string subTitle, string iconPath, bool useMain _api.ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner); } + public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true, bool forceShown = false) + { + _api.ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner, forceShown); + } + public void OpenSettingDialog() { _api.OpenSettingDialog(); From 0eb5e0bc0992fb2c8fb223768364c714eea4ddae Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:18:15 +0800 Subject: [PATCH 06/10] Update message display methods for better feedback Refactored message display calls to use error-specific methods (e.g., ShowMsgError) and added iconPath and forceShown parameters. These changes improve user feedback and ensure consistent message presentation, especially for errors and update notifications. --- Flow.Launcher.Core/Plugin/PluginManager.cs | 6 ++---- Flow.Launcher.Core/Updater.cs | 4 ++-- .../Search/Everything/EverythingDownloadHelper.cs | 4 ++-- .../Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index 78464ddc9ba..167e77ba157 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -312,11 +312,9 @@ public static async Task InitializePluginsAsync(IResultUpdateRegister register) if (!_initFailedPlugins.IsEmpty) { var failed = string.Join(",", _initFailedPlugins.Values.Select(x => x.Metadata.Name)); - PublicApi.Instance.ShowMsg( + PublicApi.Instance.ShowMsgError( Localize.failedToInitializePluginsTitle(), - Localize.failedToInitializePluginsMessage(failed), - "", - false + Localize.failedToInitializePluginsMessage(failed) ); } } diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs index 1f138e843e8..a9380efbe79 100644 --- a/Flow.Launcher.Core/Updater.cs +++ b/Flow.Launcher.Core/Updater.cs @@ -42,7 +42,7 @@ public async Task UpdateAppAsync(bool silentUpdate = true) { if (!silentUpdate) _api.ShowMsg(Localize.pleaseWait(), - Localize.update_flowlauncher_update_check()); + Localize.update_flowlauncher_update_check(), iconPath: "", forceShown: true); using var updateManager = await GitHubUpdateManagerAsync(GitHubRepository).ConfigureAwait(false); @@ -64,7 +64,7 @@ public async Task UpdateAppAsync(bool silentUpdate = true) if (!silentUpdate) _api.ShowMsg(Localize.update_flowlauncher_update_found(), - Localize.update_flowlauncher_updating()); + Localize.update_flowlauncher_updating(), iconPath: "", forceShown: true); await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply).ConfigureAwait(false); diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs index 13d988f1ad0..4a52bd8684f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs @@ -42,12 +42,12 @@ public static async Task PromptDownloadIfNotInstallAsync(string installe } api.ShowMsg(Localize.flowlauncher_plugin_everything_installing_title(), - Localize.flowlauncher_plugin_everything_installing_subtitle(), "", useMainWindowAsOwner: false); + Localize.flowlauncher_plugin_everything_installing_subtitle(), iconPath: "", forceShown: true); await DroplexPackage.Drop(App.Everything1_4_1_1009).ConfigureAwait(false); api.ShowMsg(Localize.flowlauncher_plugin_everything_installing_title(), - Localize.flowlauncher_plugin_everything_installationsuccess_subtitle(), "", useMainWindowAsOwner: false); + Localize.flowlauncher_plugin_everything_installationsuccess_subtitle(), iconPath: "", forceShown: true); installedLocation = "C:\\Program Files\\Everything\\Everything.exe"; diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index efbe8d7ba7d..940bc540d00 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -110,7 +110,7 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin) return; } - Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_update_alreadyexists")); + Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_update_alreadyexists")); return; } From 662180be682fbdf2133f827c2a89fde69f9c0939 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:20:10 +0800 Subject: [PATCH 07/10] Fix format --- Flow.Launcher/PublicAPIInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 72f04f9803e..a81fa3c17ee 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -145,7 +145,7 @@ public void ShowMsgWithButton(string title, string buttonText, Action buttonActi ShowMsgWithButton(title, buttonText, buttonAction, subTitle, iconPath); public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle, string iconPath, bool useMainWindowAsOwner = true) - { + { Notification.ShowWithButton(title, buttonText, buttonAction, subTitle, iconPath); } From be7c92220d61a3d4c69554559b1527c085fa55fe Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:24:27 +0800 Subject: [PATCH 08/10] Update notification methods to set owner and forceShown flags Explicitly set useMainWindowAsOwner and forceShown parameters in message and notification methods to ensure consistent notification display and ownership context. This improves reliability and fixes potential issues with notification visibility. --- Flow.Launcher/PublicAPIInstance.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index a81fa3c17ee..282f81bb25c 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -119,16 +119,16 @@ public void SaveAppAllSettings() public Task ReloadAllPluginData() => PluginManager.ReloadDataAsync(); public void ShowMsgError(string title, string subTitle = "") => - ShowMsg(title, subTitle, Constant.ErrorIcon, forceShown:true); + ShowMsg(title, subTitle, Constant.ErrorIcon, useMainWindowAsOwner: true, forceShown:true); public void ShowMsgErrorWithButton(string title, string buttonText, Action buttonAction, string subTitle = "") => - ShowMsgWithButton(title, buttonText, buttonAction, subTitle, Constant.ErrorIcon); + ShowMsgWithButton(title, buttonText, buttonAction, subTitle, Constant.ErrorIcon, useMainWindowAsOwner: true); public void ShowMsg(string title, string subTitle = "", string iconPath = "") => - ShowMsg(title, subTitle, iconPath); + ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner:true, forceShown:false); public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true) => - ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner:useMainWindowAsOwner); + ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner: true, forceShown: false); public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true, bool forceShown = false) { @@ -142,7 +142,7 @@ public void ShowMsg(string title, string subTitle, string iconPath, bool useMain } public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle = "", string iconPath = "") => - ShowMsgWithButton(title, buttonText, buttonAction, subTitle, iconPath); + ShowMsgWithButton(title, buttonText, buttonAction, subTitle, iconPath, useMainWindowAsOwner: true); public void ShowMsgWithButton(string title, string buttonText, Action buttonAction, string subTitle, string iconPath, bool useMainWindowAsOwner = true) { From d0a69997127184a33d5d87e9361cd2f48f3ed93b Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:28:17 +0800 Subject: [PATCH 09/10] Standardize ShowMsg usage with iconPath and forceShown Update all ShowMsg calls in PluginInstaller.cs and PluginsManager.cs to include iconPath (empty string) and forceShown (true). This ensures consistent message display behavior and no icon for plugin install, update, and uninstall notifications. --- Flow.Launcher.Core/Plugin/PluginInstaller.cs | 19 +++++++++---- .../PluginsManager.cs | 28 ++++++++++++++----- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginInstaller.cs b/Flow.Launcher.Core/Plugin/PluginInstaller.cs index 6027b712e73..47a250a364f 100644 --- a/Flow.Launcher.Core/Plugin/PluginInstaller.cs +++ b/Flow.Launcher.Core/Plugin/PluginInstaller.cs @@ -99,7 +99,9 @@ await DownloadFileAsync( { PublicApi.Instance.ShowMsg( Localize.installbtn(), - Localize.InstallSuccessNoRestart(newPlugin.Name)); + Localize.InstallSuccessNoRestart(newPlugin.Name), + iconPath: "", + forceShown: true); } } @@ -194,7 +196,9 @@ public static async Task UninstallPluginAndCheckRestartAsync(PluginMetadata oldP { PublicApi.Instance.ShowMsg( Localize.uninstallbtn(), - Localize.UninstallSuccessNoRestart(oldPlugin.Name)); + Localize.UninstallSuccessNoRestart(oldPlugin.Name), + iconPath: "", + forceShown: true); } } @@ -254,7 +258,9 @@ await DownloadFileAsync( { PublicApi.Instance.ShowMsg( Localize.updatebtn(), - Localize.UpdateSuccessNoRestart(newPlugin.Name)); + Localize.UpdateSuccessNoRestart(newPlugin.Name), + iconPath: "", + forceShown: true); } } @@ -298,7 +304,8 @@ where string.Compare(existingPlugin.Metadata.Version, pluginUpdateSource.Version { if (!silentUpdate) { - PublicApi.Instance.ShowMsg(Localize.updateNoResultTitle(), Localize.updateNoResultSubtitle()); + PublicApi.Instance.ShowMsg(Localize.updateNoResultTitle(), Localize.updateNoResultSubtitle(), iconPath: "", + forceShown: true); } return; } @@ -370,7 +377,9 @@ await DownloadFileAsync( { PublicApi.Instance.ShowMsg( Localize.updatebtn(), - Localize.PluginsUpdateSuccessNoRestart()); + Localize.PluginsUpdateSuccessNoRestart(), + iconPath: "", + forceShown: true); } } diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index 940bc540d00..7586644b690 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -194,14 +194,18 @@ await DownloadFileAsync( { Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_installing_plugin"), string.Format(Context.API.GetTranslation("plugin_pluginsmanager_install_success_restart"), - plugin.Name)); + plugin.Name), + iconPath: "", + forceShown: true); Context.API.RestartApp(); } else { Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_installing_plugin"), string.Format(Context.API.GetTranslation("plugin_pluginsmanager_install_success_no_restart"), - plugin.Name)); + plugin.Name), + iconPath: "", + forceShown: true); } } @@ -383,7 +387,9 @@ await DownloadFileAsync( string.Format( Context.API.GetTranslation( "plugin_pluginsmanager_update_success_restart"), - x.Name)); + x.Name), + iconPath: "", + forceShown: true); Context.API.RestartApp(); } else @@ -393,7 +399,9 @@ await DownloadFileAsync( string.Format( Context.API.GetTranslation( "plugin_pluginsmanager_update_success_no_restart"), - x.Name)); + x.Name), + iconPath: "", + forceShown: true); } } } @@ -510,7 +518,9 @@ await DownloadFileAsync( Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_update_title"), string.Format( Context.API.GetTranslation("plugin_pluginsmanager_update_all_success_restart"), - resultsForUpdate.Count)); + resultsForUpdate.Count), + iconPath: "", + forceShown: true); Context.API.RestartApp(); } else @@ -518,7 +528,9 @@ await DownloadFileAsync( Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_update_title"), string.Format( Context.API.GetTranslation("plugin_pluginsmanager_update_all_success_no_restart"), - resultsForUpdate.Count)); + resultsForUpdate.Count), + iconPath: "", + forceShown: true); } return true; @@ -809,7 +821,9 @@ internal List RequestUninstall(string search) string.Format( Context.API.GetTranslation( "plugin_pluginsmanager_uninstall_success_no_restart"), - x.Metadata.Name)); + x.Metadata.Name), + iconPath: "", + forceShown: true); } return true; From 9640686203391d1c91fd7680f1d4076d1234d7ad Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 26 Apr 2026 15:30:20 +0800 Subject: [PATCH 10/10] Increase SettingsCard margin and add header icon Increased the top margin of the "enableSuccessNotification" SettingsCard from 4 to 14 units for improved spacing. Added a header icon (FontIcon with glyph ) to enhance visual clarity. --- Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml index 08cf85ff64c..bdfeea056b9 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml @@ -93,9 +93,13 @@ + + + +