Skip to content

Commit e38b57d

Browse files
committed
separate methods to better reflect responsibility
1 parent 41087d8 commit e38b57d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/FolderLinks/QuickFolderAccess.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ namespace Flow.Launcher.Plugin.Explorer.Search.FolderLinks
66
{
77
public class QuickFolderAccess
88
{
9-
internal List<Result> FolderList(Query query, List<FolderLink> folderLinks, PluginInitContext context)
9+
internal List<Result> FolderListMatched(Query query, List<FolderLink> folderLinks, PluginInitContext context)
1010
{
1111
if (string.IsNullOrEmpty(query.Search))
12-
return folderLinks
13-
.Select(item =>
14-
new ResultManager(context)
15-
.CreateFolderResult(item.Nickname, item.Path, item.Path, query))
16-
.ToList();
12+
return new List<Result>();
1713

1814
string search = query.Search.ToLower();
1915

@@ -24,5 +20,11 @@ internal List<Result> FolderList(Query query, List<FolderLink> folderLinks, Plug
2420
.CreateFolderResult(item.Nickname, item.Path, item.Path, query))
2521
.ToList();
2622
}
23+
24+
internal List<Result> FolderListAll(Query query, List<FolderLink> folderLinks, PluginInitContext context)
25+
=> folderLinks
26+
.Select(item =>
27+
new ResultManager(context).CreateFolderResult(item.Nickname, item.Path, item.Path, query))
28+
.ToList();
2729
}
2830
}

0 commit comments

Comments
 (0)