File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Files.App/Actions/Show Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,17 @@ public ToggleFilterHeaderAction()
2828 generalSettingsService . PropertyChanged += GeneralSettingsService_PropertyChanged ;
2929 }
3030
31- public Task ExecuteAsync ( object ? parameter = null )
31+ public async Task ExecuteAsync ( object ? parameter = null )
3232 {
3333 generalSettingsService . ShowFilterHeader = ! IsOn ;
3434
3535 if ( IsOn )
3636 {
37+ // Delay to ensure the UI updates before focusing
38+ await Task . Delay ( 100 ) ;
3739 var filterTextBox = ( MainWindow . Instance . Content as Frame ) ? . FindDescendant ( "FilterTextBox" ) as AutoSuggestBox ;
3840 filterTextBox ? . Focus ( FocusState . Programmatic ) ;
3941 }
40-
41- return Task . CompletedTask ;
4242 }
4343
4444 private void GeneralSettingsService_PropertyChanged ( object ? sender , PropertyChangedEventArgs e )
You can’t perform that action at this time.
0 commit comments