File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
src/Files.App/ViewModels/UserControls Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -1279,19 +1279,20 @@ await Task.Run(() =>
12791279
12801280 public async Task PopulateOmnibarSuggestionsForSearchMode ( )
12811281 {
1282- OmnibarSearchModeSuggestionItems . Clear ( ) ;
1283-
12841282 if ( ContentPageContext . ShellPage is null )
12851283 return ;
12861284
1287- ContentPageContext . ShellPage . ShellViewModel . FilesAndFoldersFilter = OmnibarSearchModeText ;
1288-
1289- // Refresh the browser to apply the search filter
1290- await ContentPageContext . ShellPage . ShellViewModel . ApplyFilesAndFoldersChangesAsync ( ) ;
1285+ List < SuggestionModel > newSuggestions = [ ] ;
12911286
1292- if ( ! string . IsNullOrWhiteSpace ( OmnibarSearchModeText ) )
1287+ if ( string . IsNullOrWhiteSpace ( OmnibarSearchModeText ) )
1288+ {
1289+ var previousSearchQueries = UserSettingsService . GeneralSettingsService . PreviousSearchQueriesList ;
1290+ if ( previousSearchQueries is not null )
1291+ newSuggestions . AddRange ( previousSearchQueries . Select ( query => new SuggestionModel ( query , true ) ) ) ;
1292+ }
1293+ else
12931294 {
1294- var search = new FolderSearch ( )
1295+ var search = new FolderSearch
12951296 {
12961297 Query = OmnibarSearchModeText ,
12971298 Folder = ContentPageContext . ShellPage . ShellViewModel . WorkingDirectory ,
You can’t perform that action at this time.
0 commit comments