Use EverythingSearchOption flag to set up FullPathSearch instead of hardcoding it

This commit is contained in:
TheBestPessimist 2023-01-26 08:55:25 +02:00
parent 2b6c92c48c
commit 1b9a879d48
2 changed files with 8 additions and 5 deletions

View file

@ -152,7 +152,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
EverythingApiDllImport.Everything_SetMax(option.MaxCount);
EverythingApiDllImport.Everything_SetSort(option.SortOption);
EverythingApiDllImport.Everything_SetMatchPath(true);
EverythingApiDllImport.Everything_SetMatchPath(option.IsFullPathSearch);
if (token.IsCancellationRequested) yield break;

View file

@ -3,12 +3,15 @@ using Flow.Launcher.Plugin.Everything.Everything;
namespace Flow.Launcher.Plugin.Explorer.Search.Everything
{
public record struct EverythingSearchOption(string Keyword,
public record struct EverythingSearchOption(
string Keyword,
SortOption SortOption,
bool IsContentSearch = false,
bool IsContentSearch = false,
string ContentSearchKeyword = default,
string ParentPath = default,
bool IsRecursive = true,
int Offset = 0,
int MaxCount = 100);
int Offset = 0,
int MaxCount = 100,
bool IsFullPathSearch = true
);
}