File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Plugins/Flow.Launcher.Plugin.PluginsManager Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ where existingPlugin.Metadata.Version.CompareTo(pluginFromManifest.Version) <
212212 Context . API . GetTranslation ( "plugin_pluginsmanager_update_title" ) ,
213213 MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
214214 {
215- Uninstall ( x . PluginExistingMetadata ) ;
215+ Uninstall ( x . PluginExistingMetadata , false ) ;
216216
217217 var downloadToFilePath = Path . Combine ( DataLocation . PluginsDirectory ,
218218 $ "{ x . Name } -{ x . NewVersion } .zip") ;
@@ -399,10 +399,13 @@ internal List<Result> RequestUninstall(string search)
399399 return Search ( results , uninstallSearch ) ;
400400 }
401401
402- private void Uninstall ( PluginMetadata plugin )
402+ private void Uninstall ( PluginMetadata plugin , bool removedSetting = true )
403403 {
404- PluginManager . Settings . Plugins . Remove ( plugin . ID ) ;
405- PluginManager . AllPlugins . RemoveAll ( p => p . Metadata . ID == plugin . ID ) ;
404+ if ( removedSetting )
405+ {
406+ PluginManager . Settings . Plugins . Remove ( plugin . ID ) ;
407+ PluginManager . AllPlugins . RemoveAll ( p => p . Metadata . ID == plugin . ID ) ;
408+ }
406409
407410 // Marked for deletion. Will be deleted on next start up
408411 using var _ = File . CreateText ( Path . Combine ( plugin . PluginDirectory , "NeedDelete.txt" ) ) ;
You can’t perform that action at this time.
0 commit comments