Skip to content

Commit 0249b25

Browse files
Jack251970TBM13
authored andcommitted
Merge pull request Flow-Launcher#3833 from WayneFerdon/dev
Add Empty Query Returning & Change ThemeSelector Keyword with ActionKeyword for Sys Plugin
1 parent 0753aef commit 0249b25

File tree

1 file changed

+8
-2
lines changed
  • Plugins/Flow.Launcher.Plugin.Sys

1 file changed

+8
-2
lines changed

Plugins/Flow.Launcher.Plugin.Sys/Main.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,19 @@ public List<Result> Query(Query query)
5656
return _themeSelector.Query(query);
5757
}
5858

59-
var commands = Commands();
59+
var commands = Commands(query);
6060
var results = new List<Result>();
61+
var isEmptyQuery = string.IsNullOrWhiteSpace(query.Search);
6162
foreach (var c in commands)
6263
{
6364
var command = _settings.Commands.First(x => x.Key == c.Title);
6465
c.Title = command.Name;
6566
c.SubTitle = command.Description;
67+
if (isEmptyQuery)
68+
{
69+
results.Add(c);
70+
continue;
71+
}
6672

6773
// Match from localized title & localized subtitle & keyword
6874
var titleMatch = _context.API.FuzzySearch(query.Search, c.Title);
@@ -174,7 +180,7 @@ private static unsafe bool EnableShutdownPrivilege()
174180
}
175181
}
176182

177-
private List<Result> Commands()
183+
private List<Result> Commands(Query query)
178184
{
179185
var results = new List<Result>();
180186
var recycleBinFolder = "shell:RecycleBinFolder";

0 commit comments

Comments
 (0)