Skip to content

Commit

Permalink
#30120 Fix updating extensions views
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jul 6, 2017
1 parent 7b6101f commit 5a40dc5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,14 @@ export class ExtensionsViewlet extends ComposedViewsViewlet implements IExtensio
this.searchInstalledExtensionsContextKey.set(InstalledExtensionsView.isInsalledExtensionsQuery(value));
this.searchRecommendedExtensionsContextKey.set(RecommendedExtensionsView.isRecommendedExtensionsQuery(value));

await this.updateViews();
await this.updateViews(!!value);
}

protected async updateViews(): TPromise<IView[]> {
protected async updateViews(showAll?: boolean): TPromise<IView[]> {
const created = await super.updateViews();
if (created.length) {
await this.progress(TPromise.join(created.map(view => (<ExtensionsListView>view).show(this.searchBox.value))));
const toShow = showAll ? this.views : created;
if (toShow.length) {
await this.progress(TPromise.join(toShow.map(view => (<ExtensionsListView>view).show(this.searchBox.value))));
}
return created;
}
Expand Down

0 comments on commit 5a40dc5

Please sign in to comment.