mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
search: Reset the search display when there's no search terms
Destroy the previous search view when there's no search terms, to make sure old search items don't show up.
This commit is contained in:
parent
2cefc8be27
commit
e6cd112379
1 changed files with 12 additions and 1 deletions
|
|
@ -459,6 +459,17 @@ const SearchResults = new Lang.Class({
|
|||
}
|
||||
},
|
||||
|
||||
_reset: function() {
|
||||
this._terms = [];
|
||||
this._results = {};
|
||||
this._clearDisplay();
|
||||
this._clearSearchTimeout();
|
||||
this._defaultResult = null;
|
||||
this._startingSearch = false;
|
||||
|
||||
this._updateSearchProgress();
|
||||
},
|
||||
|
||||
_doSearch: function() {
|
||||
this._startingSearch = false;
|
||||
|
||||
|
|
@ -493,7 +504,7 @@ const SearchResults = new Lang.Class({
|
|||
this._cancellable.reset();
|
||||
|
||||
if (terms.length == 0) {
|
||||
this._clearSearchTimeout();
|
||||
this._reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue