From 797464d356fe550a1625e5ffb4eb8b0429524d88 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 5 Dec 2022 07:06:20 +1100 Subject: [PATCH] remove unnecessary show Windows index state in context menu option --- .../Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 9 --------- .../Images/index.png | Bin 2164 -> 0 bytes .../Search/ResultManager.cs | 12 ++++-------- .../Search/SearchResult.cs | 4 +--- 4 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 Plugins/Flow.Launcher.Plugin.Explorer/Images/index.png diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index a2d72edb1..1a6159073 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -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"; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Images/index.png b/Plugins/Flow.Launcher.Plugin.Explorer/Images/index.png deleted file mode 100644 index a671dac21e7b6afe9ab10f12a504e4e562f11bcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2164 zcmbVO4^$I%96x26!w5xFBGdDV2-$YGO@v(x#7!OPU@}Y;5O2F1yT`VhyTgqMDpraV zFN7o!%1n)?0sg_%=ikzNfSDADDP|y&fnkb}Kxy{~FwFXu&HVO_A ziG_L$!{88^hzJdlighvpEWspV6qA8lh+()i1eb=wgBJqC*+>H(tDG|^46Njck>jj5 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GW=AV4 IW-VL$7c1#MAOHXW diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index f697230e6..e9cbfc2bd 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -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 } }; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs index eee88b957..92c24559d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs @@ -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; } } }