Skip to content

Commit 2022300

Browse files
authored
Feature: Updated query to include unindexed items in results (#14415)
1 parent 4e6cf66 commit 2022300

File tree

22 files changed

+8
-179
lines changed

22 files changed

+8
-179
lines changed

src/Files.App/Actions/Global/SearchUnindexedItemsAction.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/Files.App/Data/Commands/CommandCodes.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public enum CommandCodes
1414
ExitCompactOverlay,
1515
ToggleCompactOverlay,
1616
Search,
17-
SearchUnindexedItems,
1817
EditPath,
1918
Redo,
2019
Undo,

src/Files.App/Data/Commands/Manager/CommandManager.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public IRichCommand this[HotKey hotKey]
4444
public IRichCommand ExitCompactOverlay => commands[CommandCodes.ExitCompactOverlay];
4545
public IRichCommand ToggleCompactOverlay => commands[CommandCodes.ToggleCompactOverlay];
4646
public IRichCommand Search => commands[CommandCodes.Search];
47-
public IRichCommand SearchUnindexedItems => commands[CommandCodes.SearchUnindexedItems];
4847
public IRichCommand EditPath => commands[CommandCodes.EditPath];
4948
public IRichCommand Redo => commands[CommandCodes.Redo];
5049
public IRichCommand Undo => commands[CommandCodes.Undo];
@@ -214,7 +213,6 @@ public CommandManager()
214213
[CommandCodes.ExitCompactOverlay] = new ExitCompactOverlayAction(),
215214
[CommandCodes.ToggleCompactOverlay] = new ToggleCompactOverlayAction(),
216215
[CommandCodes.Search] = new SearchAction(),
217-
[CommandCodes.SearchUnindexedItems] = new SearchUnindexedItemsAction(),
218216
[CommandCodes.EditPath] = new EditPathAction(),
219217
[CommandCodes.Redo] = new RedoAction(),
220218
[CommandCodes.Undo] = new UndoAction(),

src/Files.App/Data/Commands/Manager/ICommandManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public interface ICommandManager : IEnumerable<IRichCommand>
1717
IRichCommand ExitCompactOverlay { get; }
1818
IRichCommand ToggleCompactOverlay { get; }
1919
IRichCommand Search { get; }
20-
IRichCommand SearchUnindexedItems { get; }
2120
IRichCommand EditPath { get; }
2221
IRichCommand Redo { get; }
2322
IRichCommand Undo { get; }

src/Files.App/Data/Contexts/ContentPage/ContentPageContext.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ internal class ContentPageContext : ObservableObject, IContentPageContext
4747

4848
public bool IsMultiPaneActive => ShellPage is not null && ShellPage.PaneHolder is not null && ShellPage.PaneHolder.IsMultiPaneActive;
4949

50-
public bool ShowSearchUnindexedItemsMessage => ShellPage is not null && ShellPage.InstanceViewModel.ShowSearchUnindexedItemsMessage;
51-
5250
public bool IsGitRepository => ShellPage is not null && ShellPage.InstanceViewModel.IsGitRepository;
5351

5452
public bool CanExecuteGitAction => IsGitRepository && !GitHelpers.IsExecutingGitAction;
@@ -151,9 +149,6 @@ private void InstanceViewModel_PropertyChanged(object? sender, PropertyChangedEv
151149
case nameof(CurrentInstanceViewModel.IsPageTypeSearchResults):
152150
UpdatePageType();
153151
break;
154-
case nameof(CurrentInstanceViewModel.ShowSearchUnindexedItemsMessage):
155-
OnPropertyChanged(nameof(ShowSearchUnindexedItemsMessage));
156-
break;
157152
case nameof(CurrentInstanceViewModel.IsGitRepository):
158153
OnPropertyChanged(nameof(IsGitRepository));
159154
OnPropertyChanged(nameof(CanExecuteGitAction));
@@ -205,7 +200,6 @@ private void Update()
205200
OnPropertyChanged(nameof(CanCreateItem));
206201
OnPropertyChanged(nameof(IsMultiPaneEnabled));
207202
OnPropertyChanged(nameof(IsMultiPaneActive));
208-
OnPropertyChanged(nameof(ShowSearchUnindexedItemsMessage));
209203
OnPropertyChanged(nameof(IsGitRepository));
210204
OnPropertyChanged(nameof(CanExecuteGitAction));
211205
}

src/Files.App/Data/Contexts/ContentPage/IContentPageContext.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public interface IContentPageContext : INotifyPropertyChanged
3030
bool IsMultiPaneEnabled { get; }
3131
bool IsMultiPaneActive { get; }
3232

33-
bool ShowSearchUnindexedItemsMessage { get; }
34-
3533
bool IsGitRepository { get; }
3634
bool CanExecuteGitAction { get; }
3735

src/Files.App/Data/EventArguments/NavigationArguments.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ public class NavigationArguments
1717

1818
public string? SearchQuery { get; set; } = null;
1919

20-
public bool SearchUnindexedItems { get; set; } = false;
21-
2220
public bool IsLayoutSwitch { get; set; } = false;
2321

2422
public IEnumerable<string>? SelectItems { get; set; }

src/Files.App/Data/Models/CurrentInstanceViewModel.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public bool IsPageTypeSearchResults
3131
SetProperty(ref isPageTypeSearchResults, value);
3232
OnPropertyChanged(nameof(CanCreateFileInPage));
3333
OnPropertyChanged(nameof(CanCopyPathInPage));
34-
OnPropertyChanged(nameof(ShowSearchUnindexedItemsMessage));
3534
}
3635
}
3736

@@ -42,24 +41,6 @@ public string CurrentSearchQuery
4241
set => SetProperty(ref currentSearchQuery, value);
4342
}
4443

45-
private bool searchedUnindexedItems;
46-
public bool SearchedUnindexedItems
47-
{
48-
get => searchedUnindexedItems;
49-
set
50-
{
51-
if (SetProperty(ref searchedUnindexedItems, value))
52-
{
53-
OnPropertyChanged(nameof(ShowSearchUnindexedItemsMessage));
54-
}
55-
}
56-
}
57-
58-
public bool ShowSearchUnindexedItemsMessage
59-
{
60-
get => !SearchedUnindexedItems && IsPageTypeSearchResults;
61-
}
62-
6344
private bool isPageTypeNotHome = false;
6445
public bool IsPageTypeNotHome
6546
{

src/Files.App/Services/Settings/GeneralSettingsService.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ public GeneralSettingsService(ISettingsSharingContext settingsSharingContext)
1313
RegisterSettingsContext(settingsSharingContext);
1414
}
1515

16-
public bool SearchUnindexedItems
17-
{
18-
get => Get(false);
19-
set => Set(value);
20-
}
21-
2216
public bool OpenSpecificPageOnStartup
2317
{
2418
get => Get(false);
@@ -267,7 +261,6 @@ protected override void RaiseOnSettingChangedEvent(object sender, SettingChanged
267261
{
268262
switch (e.SettingName)
269263
{
270-
case nameof(SearchUnindexedItems):
271264
case nameof(OpenSpecificPageOnStartup):
272265
case nameof(ContinueLastSessionOnStartUp):
273266
case nameof(OpenNewTabOnStartup):

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,6 @@
987987
<data name="ShowProtectedSystemFiles" xml:space="preserve">
988988
<value>Show protected system files</value>
989989
</data>
990-
<data name="SettingsSearchUnindexedItems" xml:space="preserve">
991-
<value>Include unindexed items in search results</value>
992-
</data>
993990
<data name="SyncFolderPreferencesAcrossDirectories" xml:space="preserve">
994991
<value>Sync layout and sorting preferences across directories</value>
995992
</data>
@@ -1281,12 +1278,6 @@
12811278
<data name="PropertyISO" xml:space="preserve">
12821279
<value>ISO speed</value>
12831280
</data>
1284-
<data name="SearchUnindexedItemsLabel.Text" xml:space="preserve">
1285-
<value>Didn't find what you're looking for?</value>
1286-
</data>
1287-
<data name="SearchUnindexedItemsButton.Content" xml:space="preserve">
1288-
<value>Search unindexed items</value>
1289-
</data>
12901281
<data name="ReplaceExisting" xml:space="preserve">
12911282
<value>Replace existing</value>
12921283
</data>
@@ -2968,9 +2959,6 @@
29682959
<data name="ShowCheckboxesWhenSelectingItems" xml:space="preserve">
29692960
<value>Show checkboxes when selecting items</value>
29702961
</data>
2971-
<data name="SearchUnindexedItemsDescription" xml:space="preserve">
2972-
<value>Search for unindexed items</value>
2973-
</data>
29742962
<data name="EditPathDescription" xml:space="preserve">
29752963
<value>Focus path bar</value>
29762964
</data>

0 commit comments

Comments
 (0)