Skip to content

Commit ed14826

Browse files
committed
Do not show error message for initialization if plugin is already disabled
1 parent d2e63ab commit ed14826

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,17 @@ public static async Task InitializePluginsAsync()
220220
catch (Exception e)
221221
{
222222
API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
223-
pair.Metadata.Disabled = true;
224-
pair.Metadata.HomeDisabled = true;
225-
failedPlugins.Enqueue(pair);
223+
if (pair.Metadata.Disabled && pair.Metadata.HomeDisabled)
224+
{
225+
// If this plugin is already disabled, do not show error message again
226+
// Or else it will be shown every time
227+
}
228+
else
229+
{
230+
pair.Metadata.Disabled = true;
231+
pair.Metadata.HomeDisabled = true;
232+
failedPlugins.Enqueue(pair);
233+
}
226234
}
227235
}));
228236

0 commit comments

Comments
 (0)