diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 807f3b7ed..1c75d3efd 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -13,6 +13,7 @@ using MessageBox = System.Windows.Forms.MessageBox; using MessageBoxIcon = System.Windows.Forms.MessageBoxIcon; using MessageBoxButton = System.Windows.Forms.MessageBoxButtons; using DialogResult = System.Windows.Forms.DialogResult; +using Flow.Launcher.Plugin.Explorer.ViewModels; namespace Flow.Launcher.Plugin.Explorer { @@ -22,10 +23,13 @@ namespace Flow.Launcher.Plugin.Explorer private Settings Settings { get; set; } - public ContextMenu(PluginInitContext context, Settings settings) + private SettingsViewModel ViewModel { get; set; } + + public ContextMenu(PluginInitContext context, Settings settings, SettingsViewModel vm) { Context = context; Settings = settings; + ViewModel = vm; } public List LoadContextMenus(Result selectedResult) @@ -68,6 +72,9 @@ namespace Flow.Launcher.Plugin.Explorer Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"), fileOrFolder), Constants.ExplorerIconImageFullPath); + + ViewModel.Save(); + return true; } catch (Exception e) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index ea44620ed..4de88ec06 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -38,7 +38,7 @@ namespace Flow.Launcher.Plugin.Explorer if (Settings.QuickFolderAccessLinks.Any()) Settings.QuickAccessLinks = Settings.QuickFolderAccessLinks; - contextMenu = new ContextMenu(Context, Settings); + contextMenu = new ContextMenu(Context, Settings, viewModel); searchManager = new SearchManager(Settings, Context); }