@@ -6,6 +6,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
6
6
{
7
7
internal static class QuickAccess
8
8
{
9
+ private const int quickAccessResultScore = 100 ;
10
+
9
11
internal static List < Result > AccessLinkListMatched ( Query query , List < AccessLink > accessLinks )
10
12
{
11
13
if ( string . IsNullOrEmpty ( query . Search ) )
@@ -15,29 +17,27 @@ internal static List<Result> AccessLinkListMatched(Query query, List<AccessLink>
15
17
16
18
var queriedAccessLinks =
17
19
accessLinks
18
- . Where ( x => x . Nickname . Contains ( search , StringComparison . OrdinalIgnoreCase ) )
20
+ . Where ( x => x . Name . Contains ( search , StringComparison . OrdinalIgnoreCase ) )
19
21
. OrderBy ( x => x . Type )
20
- . ThenBy ( x => x . Nickname ) ;
22
+ . ThenBy ( x => x . Name ) ;
21
23
22
24
return queriedAccessLinks . Select ( l => l . Type switch
23
25
{
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 ) ,
26
28
_ => throw new ArgumentOutOfRangeException ( )
27
-
28
29
} ) . ToList ( ) ;
29
30
}
30
31
31
32
internal static List < Result > AccessLinkListAll ( Query query , List < AccessLink > accessLinks )
32
33
=> accessLinks
33
34
. OrderBy ( x => x . Type )
34
- . ThenBy ( x => x . Nickname )
35
+ . ThenBy ( x => x . Name )
35
36
. Select ( l => l . Type switch
36
37
{
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 ) ,
39
40
_ => throw new ArgumentOutOfRangeException ( )
40
-
41
41
} ) . ToList ( ) ;
42
42
}
43
43
}
0 commit comments