Don't show all sections each time the search is updated
We shouldn't show all sections each time the search is updated because that breaks viewing search results for a single section and flickers headers for sections with no results.
This commit is contained in:
parent
eb8176deeb
commit
abdd8b330c
@ -889,6 +889,9 @@ Dash.prototype = {
|
|||||||
_updateDashActors: function() {
|
_updateDashActors: function() {
|
||||||
if (this._searchPending) {
|
if (this._searchPending) {
|
||||||
this._searchResultsSection.actor.show();
|
this._searchResultsSection.actor.show();
|
||||||
|
// We initially hide all sections when we start a search. When the search timeout
|
||||||
|
// first runs, the sections that have matching results are shown. As the search
|
||||||
|
// is refined, only the sections that have matching results will be shown.
|
||||||
for (let i = 0; i < this._searchSections.length; i++) {
|
for (let i = 0; i < this._searchSections.length; i++) {
|
||||||
let section = this._searchSections[i];
|
let section = this._searchSections[i];
|
||||||
section.header.actor.hide();
|
section.header.actor.hide();
|
||||||
@ -897,13 +900,7 @@ Dash.prototype = {
|
|||||||
this._appsSection.actor.hide();
|
this._appsSection.actor.hide();
|
||||||
this._placesSection.actor.hide();
|
this._placesSection.actor.hide();
|
||||||
this._docsSection.actor.hide();
|
this._docsSection.actor.hide();
|
||||||
} else if (this._searchActive) {
|
} else if (!this._searchActive) {
|
||||||
for (let i = 0; i < this._searchSections.length; i++) {
|
|
||||||
let section = this._searchSections[i];
|
|
||||||
section.header.actor.show();
|
|
||||||
section.resultArea.actor.show();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this._showAllSearchSections();
|
this._showAllSearchSections();
|
||||||
this._searchResultsSection.actor.hide();
|
this._searchResultsSection.actor.hide();
|
||||||
this._appsSection.actor.show();
|
this._appsSection.actor.show();
|
||||||
|
Loading…
Reference in New Issue
Block a user