Skip to content

Commit

Permalink
[Tree-view] Hide tree-view on reload
Browse files Browse the repository at this point in the history
Fixes: eclipse-theia#7037

Respects hide and collapse for tree-views such as `NPM Scripts` on
reload.

Co-authored-by: Anas Shahid <muhammad.shahid@ericsson.com>
Co-authored-by: vince-fugnitto <vincent.fugnitto@ericsson.com>

Signed-off-by: Anas Shahid <muhammad.shahid@ericsson.com>
  • Loading branch information
Anas Shahid committed Jul 21, 2020
1 parent ac06ac9 commit 2c75d47
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,14 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
iconClass: 'theia-plugin-test-tab-icon',
closeable: true
});
this.contextKeyService.onDidChange(e => {
this.contextKeyService.onDidChange(async e => {
for (const [, view] of this.views.values()) {
const clauseContext = this.viewClauseContexts.get(view.id);
const pluginView = await this.getView(view.id);
// does not update the view visibility if the view is hidden explicitly.
if (pluginView && pluginView.isHidden) {
return;
}
if (clauseContext && e.affects(clauseContext)) {
this.updateViewVisibility(view.id);
}
Expand Down

0 comments on commit 2c75d47

Please sign in to comment.