File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/Files.App/ViewModels/Settings Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ public ModifiableActionItem? SelectedActionItem
7676 set => SetProperty ( ref _SelectedActionItem , value ) ;
7777 }
7878
79+ private string _currentFilterQuery = string . Empty ;
80+
7981 // Commands
8082
8183 public ICommand LoadAllActionsCommand { get ; set ; }
@@ -255,6 +257,9 @@ ActionsSettingsService.ActionsV2 is not null
255257
256258 // Add to existing list
257259 ValidActionItems . Insert ( 0 , selectedNewItem ) ;
260+
261+ // Refresh filtered list
262+ FilterItems ( _currentFilterQuery ) ;
258263 }
259264
260265 private void ExecuteShowRestoreDefaultsConfirmationCommand ( )
@@ -440,10 +445,16 @@ ActionsSettingsService.ActionsV2 is not null
440445 // Exit edit mode
441446 item . IsInEditMode = false ;
442447 ValidActionItems . Remove ( item ) ;
448+
449+ // Refresh filtered list
450+ FilterItems ( _currentFilterQuery ) ;
443451 }
444452
445453 public void FilterItems ( string query )
446454 {
455+ // Store the current filter query for later use
456+ _currentFilterQuery = query ?? string . Empty ;
457+
447458 if ( string . IsNullOrEmpty ( query ) )
448459 {
449460 FilteredActionItems = new ObservableCollection < ModifiableActionItem > ( ValidActionItems ) ;
@@ -458,4 +469,4 @@ public void FilterItems(string query)
458469 }
459470 }
460471 }
461- }
472+ }
You can’t perform that action at this time.
0 commit comments