Skip to content

Commit

Permalink
Avoid an unnecessary settings target search, and correctly clear the …
Browse files Browse the repository at this point in the history
…lastFilterResult
  • Loading branch information
roblourens committed Jun 9, 2018
1 parent 539e5c9 commit 36f3337
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,9 @@ class PreferencesRenderersController extends Disposable {
if (!editableContentOnly) {
filterPs.push(
this._filterOrSearchPreferences(query, this.defaultPreferencesRenderer, searchProvider, groupId, groupLabel, groupOrder));
filterPs.push(this.searchAllSettingsTargets(query, searchProvider, groupId, groupLabel, groupOrder));
}

filterPs.push(this.searchAllSettingsTargets(query, searchProvider, groupId, groupLabel, groupOrder));

return TPromise.join(filterPs).then(results => {
let [editableFilterResult, defaultFilterResult] = results;

Expand All @@ -481,9 +480,7 @@ class PreferencesRenderersController extends Disposable {
}

this.consolidateAndUpdate(defaultFilterResult, editableFilterResult);
if (defaultFilterResult) {
this._lastFilterResult = defaultFilterResult;
}
this._lastFilterResult = defaultFilterResult;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ export class SearchWidget extends Widget {
}

public showMessage(message: string, count: number): void {
// Avoid setting the aria-label unnecessarily, the screenreader will read the count every time it's set. #50968
// Avoid setting the aria-label unnecessarily, the screenreader will read the count every time it's set, since it's aria-live:assertive. #50968
if (this.countElement && message !== this.countElement.textContent) {
this.countElement.textContent = message;
this.inputBox.inputElement.setAttribute('aria-label', message);
Expand Down

0 comments on commit 36f3337

Please sign in to comment.