mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove unnecessary view model reference
This commit is contained in:
parent
2018956034
commit
7ca0dba461
2 changed files with 4 additions and 8 deletions
|
|
@ -21,13 +21,10 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
|
|
||||||
private Settings Settings { get; set; }
|
private Settings Settings { get; set; }
|
||||||
|
|
||||||
private SettingsViewModel ViewModel { get; set; }
|
public ContextMenu(PluginInitContext context, Settings settings)
|
||||||
|
|
||||||
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)
|
||||||
|
|
@ -84,7 +81,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"),
|
Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"),
|
||||||
Constants.ExplorerIconImageFullPath);
|
Constants.ExplorerIconImageFullPath);
|
||||||
|
|
||||||
ViewModel.Save();
|
Context.API.SaveSettingJsonStorage<Settings>();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
@ -108,7 +105,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
Context.API.GetTranslation("plugin_explorer_removefilefoldersuccess_detail"),
|
Context.API.GetTranslation("plugin_explorer_removefilefoldersuccess_detail"),
|
||||||
Constants.ExplorerIconImageFullPath);
|
Constants.ExplorerIconImageFullPath);
|
||||||
|
|
||||||
ViewModel.Save();
|
Context.API.SaveSettingJsonStorage<Settings>();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
||||||
FillQuickAccessLinkNames();
|
FillQuickAccessLinkNames();
|
||||||
|
|
||||||
viewModel = new SettingsViewModel(context, Settings);
|
viewModel = new SettingsViewModel(context, Settings);
|
||||||
|
contextMenu = new ContextMenu(Context, Settings);
|
||||||
contextMenu = new ContextMenu(Context, Settings, viewModel);
|
|
||||||
searchManager = new SearchManager(Settings, Context);
|
searchManager = new SearchManager(Settings, Context);
|
||||||
ResultManager.Init(Context, Settings);
|
ResultManager.Init(Context, Settings);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue