mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add save after adding to quick access
This commit is contained in:
parent
dd57bfc6f8
commit
d90b6d23d3
2 changed files with 9 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ using MessageBox = System.Windows.Forms.MessageBox;
|
||||||
using MessageBoxIcon = System.Windows.Forms.MessageBoxIcon;
|
using MessageBoxIcon = System.Windows.Forms.MessageBoxIcon;
|
||||||
using MessageBoxButton = System.Windows.Forms.MessageBoxButtons;
|
using MessageBoxButton = System.Windows.Forms.MessageBoxButtons;
|
||||||
using DialogResult = System.Windows.Forms.DialogResult;
|
using DialogResult = System.Windows.Forms.DialogResult;
|
||||||
|
using Flow.Launcher.Plugin.Explorer.ViewModels;
|
||||||
|
|
||||||
namespace Flow.Launcher.Plugin.Explorer
|
namespace Flow.Launcher.Plugin.Explorer
|
||||||
{
|
{
|
||||||
|
|
@ -22,10 +23,13 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
|
|
||||||
private Settings Settings { get; set; }
|
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;
|
Context = context;
|
||||||
Settings = settings;
|
Settings = settings;
|
||||||
|
ViewModel = vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Result> LoadContextMenus(Result selectedResult)
|
public List<Result> LoadContextMenus(Result selectedResult)
|
||||||
|
|
@ -68,6 +72,9 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"),
|
Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"),
|
||||||
fileOrFolder),
|
fileOrFolder),
|
||||||
Constants.ExplorerIconImageFullPath);
|
Constants.ExplorerIconImageFullPath);
|
||||||
|
|
||||||
|
ViewModel.Save();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
if (Settings.QuickFolderAccessLinks.Any())
|
if (Settings.QuickFolderAccessLinks.Any())
|
||||||
Settings.QuickAccessLinks = Settings.QuickFolderAccessLinks;
|
Settings.QuickAccessLinks = Settings.QuickFolderAccessLinks;
|
||||||
|
|
||||||
contextMenu = new ContextMenu(Context, Settings);
|
contextMenu = new ContextMenu(Context, Settings, viewModel);
|
||||||
searchManager = new SearchManager(Settings, Context);
|
searchManager = new SearchManager(Settings, Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue