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 SettingsViewModel ViewModel { get; set; }
|
||||
|
||||
public ContextMenu(PluginInitContext context, Settings settings, SettingsViewModel vm)
|
||||
public ContextMenu(PluginInitContext context, Settings settings)
|
||||
{
|
||||
Context = context;
|
||||
Settings = settings;
|
||||
ViewModel = vm;
|
||||
}
|
||||
|
||||
public List<Result> LoadContextMenus(Result selectedResult)
|
||||
|
|
@ -84,7 +81,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"),
|
||||
Constants.ExplorerIconImageFullPath);
|
||||
|
||||
ViewModel.Save();
|
||||
Context.API.SaveSettingJsonStorage<Settings>();
|
||||
|
||||
return true;
|
||||
},
|
||||
|
|
@ -108,7 +105,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
Context.API.GetTranslation("plugin_explorer_removefilefoldersuccess_detail"),
|
||||
Constants.ExplorerIconImageFullPath);
|
||||
|
||||
ViewModel.Save();
|
||||
Context.API.SaveSettingJsonStorage<Settings>();
|
||||
|
||||
return true;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
FillQuickAccessLinkNames();
|
||||
|
||||
viewModel = new SettingsViewModel(context, Settings);
|
||||
|
||||
contextMenu = new ContextMenu(Context, Settings, viewModel);
|
||||
contextMenu = new ContextMenu(Context, Settings);
|
||||
searchManager = new SearchManager(Settings, Context);
|
||||
ResultManager.Init(Context, Settings);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue