Skip to content

Commit 8e6eaf7

Browse files
authored
Merge pull request #3796 from Flow-Launcher/program_empty_query
Return results when query is empty for Program
2 parents aedfbfc + 80b7775 commit 8e6eaf7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
104104
.Where(p => HideDuplicatedWindowsAppFilter(p, uwpsDirectories))
105105
.Where(p => p.Enabled)
106106
.Select(p => p.Result(query.Search, Context.API))
107-
.Where(r => r?.Score > 0)
107+
.Where(r => string.IsNullOrEmpty(query.Search) || r?.Score > 0)
108108
.ToList();
109109
}
110110
catch (OperationCanceledException)

Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public Result Result(string query, IPublicAPI api)
424424
}
425425
}
426426

427-
if (!matchResult.IsSearchPrecisionScoreMet())
427+
if (!matchResult.IsSearchPrecisionScoreMet() && !string.IsNullOrEmpty(query))
428428
return null;
429429

430430
var result = new Result
@@ -468,7 +468,6 @@ public Result Result(string query, IPublicAPI api)
468468
}
469469
};
470470

471-
472471
return result;
473472
}
474473

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public Result Result(string query, IPublicAPI api)
136136

137137
List<string> candidates = new List<string>();
138138

139-
if (!matchResult.IsSearchPrecisionScoreMet())
139+
if (!matchResult.IsSearchPrecisionScoreMet() && !string.IsNullOrEmpty(query))
140140
{
141141
if (ExecutableName != null) // only lnk program will need this one
142142
{

0 commit comments

Comments
 (0)