mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
don't remove setting when updating
This commit is contained in:
parent
409efe41f2
commit
f23f3d3e7f
1 changed files with 7 additions and 4 deletions
|
|
@ -212,7 +212,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
Context.API.GetTranslation("plugin_pluginsmanager_update_title"),
|
||||
MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
Uninstall(x.PluginExistingMetadata);
|
||||
Uninstall(x.PluginExistingMetadata, false);
|
||||
|
||||
var downloadToFilePath = Path.Combine(DataLocation.PluginsDirectory,
|
||||
$"{x.Name}-{x.NewVersion}.zip");
|
||||
|
|
@ -399,10 +399,13 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
return Search(results, uninstallSearch);
|
||||
}
|
||||
|
||||
private void Uninstall(PluginMetadata plugin)
|
||||
private void Uninstall(PluginMetadata plugin, bool removedSetting = true)
|
||||
{
|
||||
PluginManager.Settings.Plugins.Remove(plugin.ID);
|
||||
PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
|
||||
if (removedSetting)
|
||||
{
|
||||
PluginManager.Settings.Plugins.Remove(plugin.ID);
|
||||
PluginManager.AllPlugins.RemoveAll(p => p.Metadata.ID == plugin.ID);
|
||||
}
|
||||
|
||||
// Marked for deletion. Will be deleted on next start up
|
||||
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue