Skip to content

Commit 0eb5e0b

Browse files
committed
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.
1 parent 2ff135d commit 0eb5e0b

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,9 @@ public static async Task InitializePluginsAsync(IResultUpdateRegister register)
312312
if (!_initFailedPlugins.IsEmpty)
313313
{
314314
var failed = string.Join(",", _initFailedPlugins.Values.Select(x => x.Metadata.Name));
315-
PublicApi.Instance.ShowMsg(
315+
PublicApi.Instance.ShowMsgError(
316316
Localize.failedToInitializePluginsTitle(),
317-
Localize.failedToInitializePluginsMessage(failed),
318-
"",
319-
false
317+
Localize.failedToInitializePluginsMessage(failed)
320318
);
321319
}
322320
}

Flow.Launcher.Core/Updater.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public async Task UpdateAppAsync(bool silentUpdate = true)
4242
{
4343
if (!silentUpdate)
4444
_api.ShowMsg(Localize.pleaseWait(),
45-
Localize.update_flowlauncher_update_check());
45+
Localize.update_flowlauncher_update_check(), iconPath: "", forceShown: true);
4646

4747
using var updateManager = await GitHubUpdateManagerAsync(GitHubRepository).ConfigureAwait(false);
4848

@@ -64,7 +64,7 @@ public async Task UpdateAppAsync(bool silentUpdate = true)
6464

6565
if (!silentUpdate)
6666
_api.ShowMsg(Localize.update_flowlauncher_update_found(),
67-
Localize.update_flowlauncher_updating());
67+
Localize.update_flowlauncher_updating(), iconPath: "", forceShown: true);
6868

6969
await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply).ConfigureAwait(false);
7070

Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public static async Task<string> PromptDownloadIfNotInstallAsync(string installe
4242
}
4343

4444
api.ShowMsg(Localize.flowlauncher_plugin_everything_installing_title(),
45-
Localize.flowlauncher_plugin_everything_installing_subtitle(), "", useMainWindowAsOwner: false);
45+
Localize.flowlauncher_plugin_everything_installing_subtitle(), iconPath: "", forceShown: true);
4646

4747
await DroplexPackage.Drop(App.Everything1_4_1_1009).ConfigureAwait(false);
4848

4949
api.ShowMsg(Localize.flowlauncher_plugin_everything_installing_title(),
50-
Localize.flowlauncher_plugin_everything_installationsuccess_subtitle(), "", useMainWindowAsOwner: false);
50+
Localize.flowlauncher_plugin_everything_installationsuccess_subtitle(), iconPath: "", forceShown: true);
5151

5252
installedLocation = "C:\\Program Files\\Everything\\Everything.exe";
5353

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
110110
return;
111111
}
112112

113-
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_update_alreadyexists"));
113+
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_update_alreadyexists"));
114114
return;
115115
}
116116

0 commit comments

Comments
 (0)