提交 09ad6343 编写于 作者: S Sandeep Somavarapu

💄

上级 3a192e94
......@@ -132,21 +132,24 @@ export class TreeView extends CollapsibleView {
}
private setInput(): TPromise<void> {
if (this.tree && !this.treeInputPromise) {
if (this.listenToDataProvider()) {
this.treeInputPromise = this.tree.setInput(new Root());
return this.treeInputPromise;
if (this.tree) {
if (!this.treeInputPromise) {
if (this.listenToDataProvider()) {
this.treeInputPromise = this.tree.setInput(new Root());
} else {
this.treeInputPromise = new TPromise<void>((c, e) => {
this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => {
if (this.id === id) {
if (this.listenToDataProvider()) {
this.tree.setInput(new Root()).then(() => c(null));
this.dataProviderRegisteredListener.dispose();
}
}
});
});
}
}
this.treeInputPromise = new TPromise<void>((c, e) => {
this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => {
if (this.id === id) {
if (this.listenToDataProvider()) {
this.tree.setInput(new Root()).then(() => c(null));
this.dataProviderRegisteredListener.dispose();
}
}
});
});
return this.treeInputPromise;
}
return TPromise.as(null);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册