File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change
1
+ using Flow . Launcher . Infrastructure . Logger ;
1
2
using Flow . Launcher . Plugin . Explorer . Search . QuickAccessLinks ;
2
3
using Microsoft . Search . Interop ;
3
4
using System ;
@@ -178,12 +179,20 @@ private static List<Result> ResultForWindexSearchOff(string rawQuery)
178
179
{
179
180
SearchManager . Settings . WarnWindowsSearchServiceOff = false ;
180
181
182
+ var pluginsManagerPlugins = api . GetAllPlugins ( ) . FirstOrDefault ( x => x . Metadata . ID == "9f8f9b14-2518-4907-b211-35ab6290dee7" ) ;
183
+
184
+ var actionKeywordCount = pluginsManagerPlugins . Metadata . ActionKeywords . Count ;
185
+
186
+ if ( actionKeywordCount > 1 )
187
+ LogException ( "PluginsManager's action keyword has increased to more than 1, this does not allow for determining the " +
188
+ "right action keyword. Explorer's code for managing Windows Search service not running exception needs to be updated" ,
189
+ new InvalidOperationException ( ) ) ;
190
+
181
191
if ( MessageBox . Show ( string . Format ( api . GetTranslation ( "plugin_explorer_alternative" ) , Environment . NewLine ) ,
182
192
api . GetTranslation ( "plugin_explorer_alternative_title" ) ,
183
- MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
193
+ MessageBoxButton . YesNo ) == MessageBoxResult . Yes
194
+ && actionKeywordCount == 1 )
184
195
{
185
- var pluginsManagerPlugins = api . GetAllPlugins ( ) . FirstOrDefault ( x => x . Metadata . ID == "9f8f9b14-2518-4907-b211-35ab6290dee7" ) ;
186
-
187
196
api . ChangeQuery ( string . Format ( "{0} install everything" , pluginsManagerPlugins . Metadata . ActionKeywords [ 0 ] ) ) ;
188
197
}
189
198
else
You can’t perform that action at this time.
0 commit comments