Skip to content

Commit 797464d

Browse files
committed
remove unnecessary show Windows index state in context menu option
1 parent e1c4ee0 commit 797464d

File tree

4 files changed

+5
-20
lines changed

4 files changed

+5
-20
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ public List<Result> LoadContextMenus(Result selectedResult)
5454
contextMenus.Add(CreateOpenWindowsIndexingOptions());
5555
}
5656

57-
if (record.ShowIndexState)
58-
contextMenus.Add(new Result
59-
{
60-
Title = "From index search: " + (record.WindowsIndexed ? "Yes" : "No"),
61-
SubTitle = "Location: " + record.FullPath,
62-
Score = 501,
63-
IcoPath = Constants.IndexImagePath
64-
});
65-
6657
var icoPath = (record.Type == ResultType.File) ? Constants.FileImagePath : Constants.FolderImagePath;
6758
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";
6859

Binary file not shown.

Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ public static Result CreateResult(Query query, SearchResult result)
4242
return result.Type switch
4343
{
4444
ResultType.Folder or ResultType.Volume => CreateFolderResult(Path.GetFileName(result.FullPath),
45-
result.FullPath, result.FullPath, query, 0, result.ShowIndexState, result.WindowsIndexed),
45+
result.FullPath, result.FullPath, query, 0, result.WindowsIndexed),
4646
ResultType.File => CreateFileResult(
47-
result.FullPath, query, 0, result.ShowIndexState, result.WindowsIndexed),
47+
result.FullPath, query, 0, result.WindowsIndexed),
4848
_ => throw new ArgumentOutOfRangeException()
4949
};
5050
}
5151

52-
internal static Result CreateFolderResult(string title, string subtitle, string path, Query query, int score = 0, bool showIndexState = false, bool windowsIndexed = false)
52+
internal static Result CreateFolderResult(string title, string subtitle, string path, Query query, int score = 0, bool windowsIndexed = false)
5353
{
5454
return new Result
5555
{
@@ -85,7 +85,6 @@ internal static Result CreateFolderResult(string title, string subtitle, string
8585
{
8686
Type = ResultType.Folder,
8787
FullPath = path,
88-
ShowIndexState = showIndexState,
8988
WindowsIndexed = windowsIndexed
9089
}
9190
};
@@ -126,7 +125,6 @@ internal static Result CreateDriveSpaceDisplayResult(string path, bool windowsIn
126125
{
127126
Type = ResultType.Volume,
128127
FullPath = path,
129-
ShowIndexState = true,
130128
WindowsIndexed = windowsIndexed
131129
}
132130
};
@@ -200,13 +198,12 @@ internal static Result CreateOpenCurrentFolderResult(string path, bool windowsIn
200198
{
201199
Type = ResultType.Folder,
202200
FullPath = path,
203-
ShowIndexState = true,
204201
WindowsIndexed = windowsIndexed
205202
}
206203
};
207204
}
208205

209-
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool showIndexState = false, bool windowsIndexed = false)
206+
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false)
210207
{
211208
var result = new Result
212209
{
@@ -261,7 +258,6 @@ internal static Result CreateFileResult(string filePath, Query query, int score
261258
{
262259
Type = ResultType.File,
263260
FullPath = filePath,
264-
ShowIndexState = showIndexState,
265261
WindowsIndexed = windowsIndexed
266262
}
267263
};
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
namespace Flow.Launcher.Plugin.Explorer.Search
44
{
@@ -9,7 +9,5 @@ public record struct SearchResult
99
public int Score { get; init; }
1010

1111
public bool WindowsIndexed { get; init; }
12-
13-
public bool ShowIndexState { get; init; }
1412
}
1513
}

0 commit comments

Comments
 (0)