File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Plugins/Flow.Launcher.Plugin.Explorer Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 13
13
using MessageBoxIcon = System . Windows . Forms . MessageBoxIcon ;
14
14
using MessageBoxButton = System . Windows . Forms . MessageBoxButtons ;
15
15
using DialogResult = System . Windows . Forms . DialogResult ;
16
+ using Flow . Launcher . Plugin . Explorer . ViewModels ;
16
17
17
18
namespace Flow . Launcher . Plugin . Explorer
18
19
{
@@ -22,10 +23,13 @@ internal class ContextMenu : IContextMenu
22
23
23
24
private Settings Settings { get ; set ; }
24
25
25
- public ContextMenu ( PluginInitContext context , Settings settings )
26
+ private SettingsViewModel ViewModel { get ; set ; }
27
+
28
+ public ContextMenu ( PluginInitContext context , Settings settings , SettingsViewModel vm )
26
29
{
27
30
Context = context ;
28
31
Settings = settings ;
32
+ ViewModel = vm ;
29
33
}
30
34
31
35
public List < Result > LoadContextMenus ( Result selectedResult )
@@ -68,6 +72,9 @@ public List<Result> LoadContextMenus(Result selectedResult)
68
72
Context . API . GetTranslation ( "plugin_explorer_addfilefoldersuccess_detail" ) ,
69
73
fileOrFolder ) ,
70
74
Constants . ExplorerIconImageFullPath ) ;
75
+
76
+ ViewModel . Save ( ) ;
77
+
71
78
return true ;
72
79
}
73
80
catch ( Exception e )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public async Task InitAsync(PluginInitContext context)
38
38
if ( Settings . QuickFolderAccessLinks . Any ( ) )
39
39
Settings . QuickAccessLinks = Settings . QuickFolderAccessLinks ;
40
40
41
- contextMenu = new ContextMenu ( Context , Settings ) ;
41
+ contextMenu = new ContextMenu ( Context , Settings , viewModel ) ;
42
42
searchManager = new SearchManager ( Settings , Context ) ;
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments