mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
update score to variable
This commit is contained in:
parent
ed52b9dfa5
commit
e75ac3288a
1 changed files with 5 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
|
|||
{
|
||||
internal static class QuickAccess
|
||||
{
|
||||
private const int quickAccessResultScore = 100;
|
||||
|
||||
internal static List<Result> AccessLinkListMatched(Query query, List<AccessLink> accessLinks)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query.Search))
|
||||
|
|
@ -21,8 +23,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
|
|||
|
||||
return queriedAccessLinks.Select(l => l.Type switch
|
||||
{
|
||||
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, 100),
|
||||
ResultType.File => ResultManager.CreateFileResult(l.Path, query, 100),
|
||||
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, quickAccessResultScore),
|
||||
ResultType.File => ResultManager.CreateFileResult(l.Path, query, quickAccessResultScore),
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
}).ToList();
|
||||
}
|
||||
|
|
@ -34,7 +36,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
|
|||
.Select(l => l.Type switch
|
||||
{
|
||||
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query),
|
||||
ResultType.File => ResultManager.CreateFileResult(l.Path, query, 100),
|
||||
ResultType.File => ResultManager.CreateFileResult(l.Path, query, quickAccessResultScore),
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
}).ToList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue