Merge pull request #3796 from Flow-Launcher/program_empty_query

Return results when query is empty for Program
This commit is contained in:
Jack Ye 2025-07-05 16:07:26 +08:00 committed by GitHub
commit 8e6eaf728d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -104,7 +104,7 @@ namespace Flow.Launcher.Plugin.Program
.Where(p => HideDuplicatedWindowsAppFilter(p, uwpsDirectories))
.Where(p => p.Enabled)
.Select(p => p.Result(query.Search, Context.API))
.Where(r => r?.Score > 0)
.Where(r => string.IsNullOrEmpty(query.Search) || r?.Score > 0)
.ToList();
}
catch (OperationCanceledException)

View file

@ -424,7 +424,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
}
if (!matchResult.IsSearchPrecisionScoreMet())
if (!matchResult.IsSearchPrecisionScoreMet() && !string.IsNullOrEmpty(query))
return null;
var result = new Result
@ -468,7 +468,6 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
};
return result;
}

View file

@ -136,7 +136,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
List<string> candidates = new List<string>();
if (!matchResult.IsSearchPrecisionScoreMet())
if (!matchResult.IsSearchPrecisionScoreMet() && !string.IsNullOrEmpty(query))
{
if (ExecutableName != null) // only lnk program will need this one
{