mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
remove unnecessary show Windows index state in context menu option
This commit is contained in:
parent
e1c4ee0208
commit
797464d356
4 changed files with 5 additions and 20 deletions
|
|
@ -54,15 +54,6 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
contextMenus.Add(CreateOpenWindowsIndexingOptions());
|
||||
}
|
||||
|
||||
if (record.ShowIndexState)
|
||||
contextMenus.Add(new Result
|
||||
{
|
||||
Title = "From index search: " + (record.WindowsIndexed ? "Yes" : "No"),
|
||||
SubTitle = "Location: " + record.FullPath,
|
||||
Score = 501,
|
||||
IcoPath = Constants.IndexImagePath
|
||||
});
|
||||
|
||||
var icoPath = (record.Type == ResultType.File) ? Constants.FileImagePath : Constants.FolderImagePath;
|
||||
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
|
|
@ -42,14 +42,14 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
return result.Type switch
|
||||
{
|
||||
ResultType.Folder or ResultType.Volume => CreateFolderResult(Path.GetFileName(result.FullPath),
|
||||
result.FullPath, result.FullPath, query, 0, result.ShowIndexState, result.WindowsIndexed),
|
||||
result.FullPath, result.FullPath, query, 0, result.WindowsIndexed),
|
||||
ResultType.File => CreateFileResult(
|
||||
result.FullPath, query, 0, result.ShowIndexState, result.WindowsIndexed),
|
||||
result.FullPath, query, 0, result.WindowsIndexed),
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
}
|
||||
|
||||
internal static Result CreateFolderResult(string title, string subtitle, string path, Query query, int score = 0, bool showIndexState = false, bool windowsIndexed = false)
|
||||
internal static Result CreateFolderResult(string title, string subtitle, string path, Query query, int score = 0, bool windowsIndexed = false)
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
|
|
@ -85,7 +85,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
{
|
||||
Type = ResultType.Folder,
|
||||
FullPath = path,
|
||||
ShowIndexState = showIndexState,
|
||||
WindowsIndexed = windowsIndexed
|
||||
}
|
||||
};
|
||||
|
|
@ -126,7 +125,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
{
|
||||
Type = ResultType.Volume,
|
||||
FullPath = path,
|
||||
ShowIndexState = true,
|
||||
WindowsIndexed = windowsIndexed
|
||||
}
|
||||
};
|
||||
|
|
@ -200,13 +198,12 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
{
|
||||
Type = ResultType.Folder,
|
||||
FullPath = path,
|
||||
ShowIndexState = true,
|
||||
WindowsIndexed = windowsIndexed
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool showIndexState = false, bool windowsIndexed = false)
|
||||
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false)
|
||||
{
|
||||
var result = new Result
|
||||
{
|
||||
|
|
@ -261,7 +258,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
{
|
||||
Type = ResultType.File,
|
||||
FullPath = filePath,
|
||||
ShowIndexState = showIndexState,
|
||||
WindowsIndexed = windowsIndexed
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Explorer.Search
|
||||
{
|
||||
|
|
@ -9,7 +9,5 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
public int Score { get; init; }
|
||||
|
||||
public bool WindowsIndexed { get; init; }
|
||||
|
||||
public bool ShowIndexState { get; init; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue