@@ -230,39 +230,6 @@ public string? PathText
230230 private string ? _OmnibarCommandPaletteModeText ;
231231 public string ? OmnibarCommandPaletteModeText { get => _OmnibarCommandPaletteModeText ; set => SetProperty ( ref _OmnibarCommandPaletteModeText , value ) ; }
232232
233- private bool _IsOmnibarFocused ;
234- public bool IsOmnibarFocused
235- {
236- get => _IsOmnibarFocused ;
237- set
238- {
239- // NOTE: Don't call ObservableObject.SetProperty() here since we don't want to change focus logic outside of the control.
240-
241- _IsOmnibarFocused = value ;
242-
243- if ( value )
244- {
245- switch ( OmnibarCurrentSelectedModeName )
246- {
247- case OmnibarPathModeName :
248- PathText =
249- string . IsNullOrEmpty ( ContentPageContext . ShellPage ? . ShellViewModel ? . WorkingDirectory )
250- ? Constants . UserEnvironmentPaths . HomePath
251- : ContentPageContext . ShellPage . ShellViewModel . WorkingDirectory ;
252- _ = PopulateOmnibarSuggestionsForPathMode ( ) ;
253- break ;
254- case OmnibarPaletteModeName :
255- PopulateOmnibarSuggestionsForCommandPaletteMode ( ) ;
256- break ;
257- case OmnibarSearchModeName :
258- break ;
259- default :
260- break ;
261- }
262- }
263- }
264- }
265-
266233 private string _OmnibarCurrentSelectedModeName = OmnibarPathModeName ;
267234 public string OmnibarCurrentSelectedModeName { get => _OmnibarCurrentSelectedModeName ; set => SetProperty ( ref _OmnibarCurrentSelectedModeName , value ) ; }
268235
@@ -735,7 +702,6 @@ await DialogDisplayHelper.ShowDialogAsync(Strings.InvalidItemDialogTitle.GetLoca
735702 }
736703
737704 PathControlDisplayText = ContentPageContext . ShellPage . ShellViewModel . WorkingDirectory ;
738- IsOmnibarFocused = false ;
739705 }
740706
741707 public void PathBoxItem_PreviewKeyDown ( object sender , KeyRoutedEventArgs e )
@@ -1074,6 +1040,8 @@ private static async Task<bool> LaunchApplicationFromPath(string currentInput, s
10741040
10751041 public async Task PopulateOmnibarSuggestionsForPathMode ( )
10761042 {
1043+ PathModeSuggestionItems . Clear ( ) ;
1044+
10771045 var result = await SafetyExtensions . IgnoreExceptions ( ( Func < Task < bool > > ) ( async ( ) =>
10781046 {
10791047 List < OmnibarPathModeSuggestionModel > ? newSuggestions = [ ] ;
0 commit comments