mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Make sure tha allViews are ready in remote explorer
Part of https://github.com/microsoft/vscode-remote-release/issues/1847
This commit is contained in:
@@ -350,6 +350,11 @@ export abstract class FilterViewContainerViewlet extends ViewContainerViewlet {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
this._register(this.viewsModel.onDidChangeActiveViews((viewDescriptors) => {
|
this._register(this.viewsModel.onDidChangeActiveViews((viewDescriptors) => {
|
||||||
|
this.updateAllViews(viewDescriptors);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateAllViews(viewDescriptors: IViewDescriptor[]) {
|
||||||
viewDescriptors.forEach(descriptor => {
|
viewDescriptors.forEach(descriptor => {
|
||||||
let filterOnValue = this.getFilterOn(descriptor);
|
let filterOnValue = this.getFilterOn(descriptor);
|
||||||
if (!filterOnValue) {
|
if (!filterOnValue) {
|
||||||
@@ -363,7 +368,6 @@ export abstract class FilterViewContainerViewlet extends ViewContainerViewlet {
|
|||||||
this.viewsModel.setVisible(descriptor.id, false);
|
this.viewsModel.setVisible(descriptor.id, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected addConstantViewDescriptors(constantViewDescriptors: IViewDescriptor[]) {
|
protected addConstantViewDescriptors(constantViewDescriptors: IViewDescriptor[]) {
|
||||||
@@ -415,6 +419,10 @@ export abstract class FilterViewContainerViewlet extends ViewContainerViewlet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onDidAddViews(added: IAddedViewDescriptorRef[]): ViewletPanel[] {
|
onDidAddViews(added: IAddedViewDescriptorRef[]): ViewletPanel[] {
|
||||||
|
// Check that allViews is ready
|
||||||
|
if (this.allViews.size === 0) {
|
||||||
|
this.updateAllViews(this.viewsModel.viewDescriptors);
|
||||||
|
}
|
||||||
const panels: ViewletPanel[] = super.onDidAddViews(added);
|
const panels: ViewletPanel[] = super.onDidAddViews(added);
|
||||||
for (let i = 0; i < added.length; i++) {
|
for (let i = 0; i < added.length; i++) {
|
||||||
if (this.constantViewDescriptors.has(added[i].viewDescriptor.id)) {
|
if (this.constantViewDescriptors.has(added[i].viewDescriptor.id)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user