Remove plugins from global & non-global plugins when they are removed from settings

This commit is contained in:
Jack251970 2025-07-06 16:45:44 +08:00
parent 1e9eaf5db8
commit b85b2ec30a

View file

@ -700,6 +700,14 @@ namespace Flow.Launcher.Core.Plugin
}
Settings.RemovePluginSettings(plugin.ID);
AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
foreach (var globalPlugin in GlobalPlugins.Where(p => p.Metadata.ID == plugin.ID))
{
GlobalPlugins.Remove(globalPlugin);
}
foreach (var key in NonGlobalPlugins.Where(p => p.Value.Metadata.ID == plugin.ID).Select(p => p.Key))
{
NonGlobalPlugins.Remove(key);
}
}
// Marked for deletion. Will be deleted on next start up