Skip to content

Commit 1bb7286

Browse files
committed
Show error message instead of message
1 parent 6318bbe commit 1bb7286

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Flow.Launcher.Core/Plugin/PluginInstaller.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static async Task InstallPluginAndCheckRestartAsync(UserPlugin newPlugin)
2929
{
3030
if (API.PluginModified(newPlugin.ID))
3131
{
32-
API.ShowMsg(string.Format(API.GetTranslation("failedToInstallPluginTitle"), newPlugin.Name),
32+
API.ShowMsgError(string.Format(API.GetTranslation("failedToInstallPluginTitle"), newPlugin.Name),
3333
API.GetTranslation("pluginModifiedAlreadyMessage"));
3434
return;
3535
}
@@ -126,7 +126,7 @@ public static async Task InstallPluginAndCheckRestartAsync(string filePath)
126126

127127
if (API.PluginModified(plugin.ID))
128128
{
129-
API.ShowMsg(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
129+
API.ShowMsgError(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
130130
API.GetTranslation("pluginModifiedAlreadyMessage"));
131131
return;
132132
}
@@ -148,7 +148,7 @@ public static async Task UninstallPluginAndCheckRestartAsync(PluginMetadata oldP
148148
{
149149
if (API.PluginModified(oldPlugin.ID))
150150
{
151-
API.ShowMsg(string.Format(API.GetTranslation("failedToUninstallPluginTitle"), oldPlugin.Name),
151+
API.ShowMsgError(string.Format(API.GetTranslation("failedToUninstallPluginTitle"), oldPlugin.Name),
152152
API.GetTranslation("pluginModifiedAlreadyMessage"));
153153
return;
154154
}

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ internal static bool InstallPlugin(UserPlugin plugin, string zipFilePath, bool c
566566
{
567567
if (checkModified && PluginModified(plugin.ID))
568568
{
569-
API.ShowMsg(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
569+
API.ShowMsgError(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
570570
API.GetTranslation("pluginModifiedAlreadyMessage"));
571571
return false;
572572
}
@@ -586,14 +586,14 @@ internal static bool InstallPlugin(UserPlugin plugin, string zipFilePath, bool c
586586

587587
if (string.IsNullOrEmpty(metadataJsonFilePath) || string.IsNullOrEmpty(pluginFolderPath))
588588
{
589-
API.ShowMsg(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
589+
API.ShowMsgError(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
590590
string.Format(API.GetTranslation("fileNotFoundMessage"), pluginFolderPath));
591591
return false;
592592
}
593593

594594
if (SameOrLesserPluginVersionExists(metadataJsonFilePath))
595595
{
596-
API.ShowMsg(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
596+
API.ShowMsgError(string.Format(API.GetTranslation("failedToInstallPluginTitle"), plugin.Name),
597597
API.GetTranslation("pluginExistAlreadyMessage"));
598598
return false;
599599
}
@@ -647,7 +647,7 @@ internal static async Task UninstallPluginAsync(PluginMetadata plugin, bool remo
647647
{
648648
if (checkModified && PluginModified(plugin.ID))
649649
{
650-
API.ShowMsg(string.Format(API.GetTranslation("failedToUninstallPluginTitle"), plugin.Name),
650+
API.ShowMsgError(string.Format(API.GetTranslation("failedToUninstallPluginTitle"), plugin.Name),
651651
API.GetTranslation("pluginModifiedAlreadyMessage"));
652652
return;
653653
}
@@ -712,6 +712,8 @@ internal static async Task UninstallPluginAsync(PluginMetadata plugin, bool remo
712712
{
713713
_modifiedPlugins.Add(plugin.ID);
714714
}
715+
716+
return;
715717
}
716718

717719
#endregion

0 commit comments

Comments
 (0)