@@ -6,6 +6,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
66{
77 internal static class QuickAccess
88 {
9+ private const int quickAccessResultScore = 100 ;
10+
911 internal static List < Result > AccessLinkListMatched ( Query query , List < AccessLink > accessLinks )
1012 {
1113 if ( string . IsNullOrEmpty ( query . Search ) )
@@ -15,29 +17,27 @@ internal static List<Result> AccessLinkListMatched(Query query, List<AccessLink>
1517
1618 var queriedAccessLinks =
1719 accessLinks
18- . Where ( x => x . Nickname . Contains ( search , StringComparison . OrdinalIgnoreCase ) )
20+ . Where ( x => x . Name . Contains ( search , StringComparison . OrdinalIgnoreCase ) )
1921 . OrderBy ( x => x . Type )
20- . ThenBy ( x => x . Nickname ) ;
22+ . ThenBy ( x => x . Name ) ;
2123
2224 return queriedAccessLinks . Select ( l => l . Type switch
2325 {
24- ResultType . Folder => ResultManager . CreateFolderResult ( l . Nickname , l . Path , l . Path , query , 100 ) ,
25- ResultType . File => ResultManager . CreateFileResult ( l . Path , query , 100 ) ,
26+ ResultType . Folder => ResultManager . CreateFolderResult ( l . Name , l . Path , l . Path , query , quickAccessResultScore ) ,
27+ ResultType . File => ResultManager . CreateFileResult ( l . Path , query , quickAccessResultScore ) ,
2628 _ => throw new ArgumentOutOfRangeException ( )
27-
2829 } ) . ToList ( ) ;
2930 }
3031
3132 internal static List < Result > AccessLinkListAll ( Query query , List < AccessLink > accessLinks )
3233 => accessLinks
3334 . OrderBy ( x => x . Type )
34- . ThenBy ( x => x . Nickname )
35+ . ThenBy ( x => x . Name )
3536 . Select ( l => l . Type switch
3637 {
37- ResultType . Folder => ResultManager . CreateFolderResult ( l . Nickname , l . Path , l . Path , query ) ,
38- ResultType . File => ResultManager . CreateFileResult ( l . Path , query , 100 ) ,
38+ ResultType . Folder => ResultManager . CreateFolderResult ( l . Name , l . Path , l . Path , query ) ,
39+ ResultType . File => ResultManager . CreateFileResult ( l . Path , query , quickAccessResultScore ) ,
3940 _ => throw new ArgumentOutOfRangeException ( )
40-
4141 } ) . ToList ( ) ;
4242 }
4343}
0 commit comments