mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
feat: Everything Run Count option
Added an option in Explorer > Everything Settings to enable/disable Run Count for file/folder.
This commit is contained in:
parent
ec17b3dea7
commit
c79b512191
6 changed files with 15 additions and 5 deletions
|
|
@ -141,6 +141,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_everything_nonfastsort_warning">Warning: This is not a Fast Sort option, searches may be slow</system:String>
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_everything_search_fullpath">Search Full Path</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_enable_run_count">Enable File/Folder Run Count</system:String>
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_everything_click_to_launch_or_install">Click to launch or install Everything</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_installing_title">Everything Installation</system:String>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
|
|||
if (token.IsCancellationRequested)
|
||||
yield break;
|
||||
|
||||
var option = new EverythingSearchOption(search, Settings.SortOption, IsFullPathSearch: Settings.EverythingSearchFullPath);
|
||||
var option = new EverythingSearchOption(search, Settings.SortOption, IsFullPathSearch: Settings.EverythingSearchFullPath, IsRunCounterEnabled: Settings.EverythingEnableRunCount);
|
||||
|
||||
await foreach (var result in EverythingApi.SearchAsync(option, token))
|
||||
yield return result;
|
||||
|
|
@ -96,7 +96,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
|
|||
Settings.SortOption,
|
||||
IsContentSearch: true,
|
||||
ContentSearchKeyword: contentSearch,
|
||||
IsFullPathSearch: Settings.EverythingSearchFullPath);
|
||||
IsFullPathSearch: Settings.EverythingSearchFullPath,
|
||||
IsRunCounterEnabled: Settings.EverythingEnableRunCount);
|
||||
|
||||
await foreach (var result in EverythingApi.SearchAsync(option, token))
|
||||
{
|
||||
|
|
@ -115,7 +116,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
|
|||
Settings.SortOption,
|
||||
ParentPath: path,
|
||||
IsRecursive: recursive,
|
||||
IsFullPathSearch: Settings.EverythingSearchFullPath);
|
||||
IsFullPathSearch: Settings.EverythingSearchFullPath,
|
||||
IsRunCounterEnabled: Settings.EverythingEnableRunCount);
|
||||
|
||||
await foreach (var result in EverythingApi.SearchAsync(option, token))
|
||||
yield return result;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
|
|||
bool IsRecursive = true,
|
||||
int Offset = 0,
|
||||
int MaxCount = 100,
|
||||
bool IsFullPathSearch = true
|
||||
bool IsFullPathSearch = true,
|
||||
bool IsRunCounterEnabled = true
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
private static void IncrementEverythingRunCounterIfNeeded(string fileOrFolder)
|
||||
{
|
||||
if (Settings.EverythingEnabled)
|
||||
if (Settings.EverythingEnabled && Settings.EverythingEnableRunCount)
|
||||
_ = Task.Run(() => EverythingApi.IncrementRunCounterAsync(fileOrFolder));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
ContentSearchEngine == ContentIndexSearchEngineOption.Everything;
|
||||
|
||||
public bool EverythingSearchFullPath { get; set; } = false;
|
||||
public bool EverythingEnableRunCount { get; set; } = true;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -465,6 +465,11 @@
|
|||
HorizontalAlignment="Left"
|
||||
Content="{DynamicResource flowlauncher_plugin_everything_search_fullpath}"
|
||||
IsChecked="{Binding Settings.EverythingSearchFullPath}" />
|
||||
<CheckBox
|
||||
Margin="20 10 0 0"
|
||||
HorizontalAlignment="Left"
|
||||
Content="{DynamicResource flowlauncher_plugin_everything_enable_run_count}"
|
||||
IsChecked="{Binding Settings.EverythingEnableRunCount}" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Grid Margin="20 10 0 10">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
|
|
|||
Loading…
Reference in a new issue