mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Ask Everything for RunCount only if sorting by it
This commit is contained in:
parent
a1a4c720c0
commit
fa971c6b81
1 changed files with 9 additions and 2 deletions
|
|
@ -115,8 +115,16 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
|
|||
|
||||
EverythingApiDllImport.Everything_SetSort(option.SortOption);
|
||||
EverythingApiDllImport.Everything_SetMatchPath(option.IsFullPathSearch);
|
||||
|
||||
if (option.SortOption == SortOption.RUN_COUNT_DESCENDING)
|
||||
{
|
||||
EverythingApiDllImport.Everything_SetRequestFlags(EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME | EVERYTHING_REQUEST_RUN_COUNT);
|
||||
}
|
||||
else
|
||||
{
|
||||
EverythingApiDllImport.Everything_SetRequestFlags(EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME);
|
||||
}
|
||||
|
||||
EverythingApiDllImport.Everything_SetRequestFlags(EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME | EVERYTHING_REQUEST_RUN_COUNT); // todo need flag for this?
|
||||
|
||||
|
||||
if (token.IsCancellationRequested) yield break;
|
||||
|
|
@ -143,7 +151,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
|
|||
Type = EverythingApiDllImport.Everything_IsFolderResult(idx) ? ResultType.Folder :
|
||||
EverythingApiDllImport.Everything_IsFileResult(idx) ? ResultType.File :
|
||||
ResultType.Volume,
|
||||
// todo need flag for this?
|
||||
Score = (int)EverythingApiDllImport.Everything_GetResultRunCount( (uint)idx)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue