Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't show view containers with hidden views on startup #6141

Merged
merged 1 commit into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
}

protected async updateViewVisibility(viewId: string): Promise<void> {
const widget = await this.getView(viewId);
if (!widget) {
if (this.isViewVisible(viewId)) {
await this.openView(viewId);
}
return;
}
const viewInfo = this.views.get(viewId);
if (!viewInfo) {
return;
Expand All @@ -157,10 +164,6 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
if (!viewContainer) {
return;
}
const widget = await this.getView(viewId);
if (!widget) {
return;
}
const part = viewContainer.getPartFor(widget);
if (!part) {
return;
Expand Down Expand Up @@ -378,8 +381,8 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
let viewContainer = await this.getPluginViewContainer(id);
if (!viewContainer) {
viewContainer = await this.openViewContainer(id);
if (viewContainer && !viewContainer.getTrackableWidgets().length) {
// close empty view containers
if (viewContainer && !viewContainer.getParts().filter(part => !part.isHidden).length) {
// close view containers without any visible view parts
viewContainer.dispose();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export class TreeViewsMainImpl implements TreeViewsMain {
this.handleTreeEvents(widget.id, widget);
return widget;
}));
await this.viewRegistry.openView(treeViewId);
}

async $unregisterTreeDataProvider(treeViewId: string): Promise<void> {
Expand Down