提交 c566c59d 编写于 作者: S Sandeep Somavarapu

#36033 Revert the related change

上级 3f4bb73c
......@@ -269,7 +269,7 @@ export class PanelViewlet extends Viewlet {
return this.panelview.getPanelSize(panel);
}
private updateViewHeaders(): void {
protected updateViewHeaders(): void {
if (this.isSingleView()) {
this.panelItems[0].panel.setExpanded(true);
this.panelItems[0].panel.headerVisible = false;
......
......@@ -241,12 +241,14 @@ export class ViewsViewlet extends PanelViewlet {
this._register(ViewsRegistry.onViewsDeregistered(this.onViewsDeregistered, this));
this._register(this.contextKeyService.onDidChangeContext(keys => this.onContextChanged(keys)));
await this.extensionService.onReady();
this.areExtensionsReady = true;
await this.updateViews();
// this.onViewsUpdated();
// Update headers after and title contributed views after available, since we read from cache in the beginning to know if the viewlet has single view or not. Ref #29609
this.extensionService.onReady().then(() => {
this.areExtensionsReady = true;
this.updateViewHeaders();
this.updateTitleArea();
});
await this.onViewsRegistered(ViewsRegistry.getViews(this.location));
this.onViewsRegistered(ViewsRegistry.getViews(this.location));
this.focus();
}
......@@ -510,7 +512,7 @@ export class ViewsViewlet extends PanelViewlet {
});
}
protected showHeaderInTitleArea(): boolean {
protected isSingleView(): boolean {
if (!this.showHeaderInTitleWhenSingleView) {
return false;
}
......@@ -520,11 +522,8 @@ export class ViewsViewlet extends PanelViewlet {
if (ViewLocation.getContributedViewLocation(this.location.id) && !this.areExtensionsReady) {
// Checks in cache so that view do not jump. See #29609
let visibleViewsCount = 0;
const viewDecriptors = this.getViewDescriptorsFromRegistry();
this.viewsStates.forEach((viewState, id) => {
const viewDescriptor = viewDecriptors.filter(viewDescriptor => viewDescriptor.id === id)[0];
const isHidden = viewState.isHidden || (viewDescriptor && !this.contextKeyService.contextMatchesRules(viewDescriptor.when));
if (!isHidden) {
if (!viewState.isHidden) {
visibleViewsCount++;
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册