File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Plugins/Flow.Launcher.Plugin.Explorer Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 7
7
using Flow . Launcher . Infrastructure . Logger ;
8
8
using Flow . Launcher . Plugin . SharedCommands ;
9
9
using Flow . Launcher . Plugin . Explorer . Search ;
10
- using System . Windows . Media ;
11
10
using System . Linq ;
11
+ using System . Reflection ;
12
12
13
13
namespace Flow . Launcher . Plugin . Explorer
14
14
{
@@ -188,13 +188,25 @@ private Result CreateAddToIndexSearchExclusionListResult(SearchResult record)
188
188
{
189
189
return new Result
190
190
{
191
- Title = "Exclude path from index search" ,
191
+ Title = "Exclude current and sub-directories from index search" ,
192
192
SubTitle = "Path: " + record . FullPath ,
193
193
Action = _ =>
194
194
{
195
195
if ( ! Main . Settings . IndexSearchExcludedSubdirectoryPaths . Any ( x => x == record . FullPath ) )
196
196
Main . Settings . IndexSearchExcludedSubdirectoryPaths . Add ( record . FullPath ) ;
197
197
198
+ var pluginDirectory = Directory . GetParent ( Assembly . GetExecutingAssembly ( ) . Location . ToString ( ) ) ;
199
+
200
+ var iconPath = pluginDirectory + "\\ " + Constants . ExplorerIconImagePath ;
201
+
202
+ Task . Run ( ( ) =>
203
+ {
204
+ Main . Context . API . ShowMsg ( "Excluded from Index Search" , "Path: " + record . FullPath , iconPath ) ;
205
+
206
+ // so the new path can be persisted to storage and not wait till next ViewModel save.
207
+ Main . Context . API . SaveAppAllSettings ( ) ;
208
+ } ) ;
209
+
198
210
return false ;
199
211
} ,
200
212
IcoPath = Constants . ExcludeFromIndexImagePath
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ internal static class Constants
12
12
internal const string CopyImagePath = "Images\\ copy.png" ;
13
13
internal const string IndexImagePath = "Images\\ index.png" ;
14
14
internal const string ExcludeFromIndexImagePath = "Images\\ excludeindexpath.png" ;
15
+ internal const string ExplorerIconImagePath = "Images\\ explorer.png" ;
15
16
16
17
internal const string DefaultFolderSubtitleString = "Ctrl + Enter to open the directory" ;
17
18
You can’t perform that action at this time.
0 commit comments