mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 00:46:12 +02:00
Remove plugins from setting that are not loaded anymore
This commit is contained in:
Binary file not shown.
@@ -557,8 +557,10 @@ namespace DesktopMagic
|
||||
|
||||
bool showWindow = true;
|
||||
|
||||
// Load plugins
|
||||
foreach (string pluginName in pluginNames)
|
||||
{
|
||||
// Add plugin to layout if it doesn't exist
|
||||
if (!Settings.CurrentLayout.Plugins.TryGetValue(pluginName, out PluginSettings? pluginSettings))
|
||||
{
|
||||
Settings.CurrentLayout.Plugins.Add(pluginName, new PluginSettings());
|
||||
@@ -577,6 +579,15 @@ namespace DesktopMagic
|
||||
}
|
||||
}
|
||||
|
||||
// Remove plugins that are not loaded anymore
|
||||
foreach (string pluginName in Settings.CurrentLayout.Plugins.Keys)
|
||||
{
|
||||
if (!pluginNames.Contains(pluginName))
|
||||
{
|
||||
Settings.CurrentLayout.Plugins.Remove(pluginName);
|
||||
}
|
||||
}
|
||||
|
||||
Settings.CurrentLayout.UpdatePlugins();
|
||||
|
||||
if (!showWindow && minimize)
|
||||
|
||||
Reference in New Issue
Block a user