File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Plugins/Flow.Launcher.Plugin.PluginIndicator Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,19 @@ public List<Result> Query(Query query)
12
12
{
13
13
var results =
14
14
from keyword in PluginManager . NonGlobalPlugins . Keys
15
- let metadata = PluginManager . NonGlobalPlugins [ keyword ] . Metadata
16
- where ( context . API . FuzzySearch ( query . Search , keyword ) . IsSearchPrecisionScoreMet ( )
17
- || context . API . FuzzySearch ( query . Search , metadata . Name ) . IsSearchPrecisionScoreMet ( )
15
+ let plugin = PluginManager . NonGlobalPlugins [ keyword ] . Metadata
16
+ let keywordSearchResult = context . API . FuzzySearch ( query . Search , keyword )
17
+ let searchResult = keywordSearchResult . IsSearchPrecisionScoreMet ( ) ? keywordSearchResult : context . API . FuzzySearch ( query . Search , plugin . Name )
18
+ let score = searchResult . Score
19
+ where ( searchResult . IsSearchPrecisionScoreMet ( )
18
20
|| string . IsNullOrEmpty ( query . Search ) ) // To list all available action keywords
19
- && ! metadata . Disabled
21
+ && ! plugin . Disabled
20
22
select new Result
21
23
{
22
24
Title = keyword ,
23
- SubTitle = string . Format ( context . API . GetTranslation ( "flowlauncher_plugin_pluginindicator_result_subtitle" ) , metadata . Name ) ,
24
- Score = 100 ,
25
- IcoPath = metadata . IcoPath ,
25
+ SubTitle = string . Format ( context . API . GetTranslation ( "flowlauncher_plugin_pluginindicator_result_subtitle" ) , plugin . Name ) ,
26
+ Score = score ,
27
+ IcoPath = plugin . IcoPath ,
26
28
AutoCompleteText = $ "{ keyword } { Plugin . Query . TermSeparator } ",
27
29
Action = c =>
28
30
{
You can’t perform that action at this time.
0 commit comments