File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,6 +193,14 @@ partial void OnGlobalSearchTextChanged(string value)
193193 UpdateSettingsSuggestions ( value ) ;
194194 }
195195
196+ public void ClearAllSearchQueries ( )
197+ {
198+ DiscoverPage . ViewModel . ClearSearchQuery ( ) ;
199+ UpdatesPage . ViewModel . ClearSearchQuery ( ) ;
200+ InstalledPage . ViewModel . ClearSearchQuery ( ) ;
201+ GlobalSearchText = "" ;
202+ }
203+
196204 // ─── Settings search suggestions ───────────────────────────────────────────
197205 public ObservableCollection < SettingsSearchResult > SettingsSuggestions { get ; } = new ( ) ;
198206
Original file line number Diff line number Diff line change @@ -500,6 +500,14 @@ partial void OnGlobalQueryTextChanged(string value)
500500 FilterPackages ( ) ;
501501 }
502502
503+ public void ClearSearchQuery ( )
504+ {
505+ QueryBackup = "" ;
506+ if ( string . IsNullOrEmpty ( GlobalQueryText ) ) return ;
507+ GlobalQueryText = "" ;
508+ if ( ! MegaQueryBoxEnabled ) FilterPackages ( ) ;
509+ }
510+
503511 [ RelayCommand ]
504512 public void SubmitSearch ( )
505513 {
Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ protected override void OnClosing(WindowClosingEventArgs e)
187187 if ( ! _allowClose && ( OperatingSystem . IsMacOS ( ) || ! Settings . Get ( Settings . K . DisableSystemTray ) ) )
188188 {
189189 e . Cancel = true ;
190+ ViewModel . ClearAllSearchQueries ( ) ;
190191 Hide ( ) ;
191192 return ;
192193 }
You can’t perform that action at this time.
0 commit comments