提交 61a3e0d3 编写于 作者: J Joao Moreno

Merge commit 'refs/pull/57806/head' of github.com:Microsoft/vscode into pr/57806

......@@ -451,7 +451,13 @@ export class Item {
private refreshChildren(recursive: boolean, safe: boolean = false, force: boolean = false): WinJS.Promise {
if (!force && !this.isExpanded()) {
this.needsChildrenRefresh = true;
const setNeedsChildrenRefresh = (item: Item) => {
item.needsChildrenRefresh = true;
item.forEachChild(setNeedsChildrenRefresh);
};
setNeedsChildrenRefresh(this);
return WinJS.TPromise.as(this);
}
......@@ -509,8 +515,14 @@ export class Item {
return child.doRefresh(recursive, true);
}));
} else {
this.mapEachChild(child => child.updateVisibility());
return WinJS.TPromise.as(null);
return WinJS.Promise.join(this.mapEachChild((child) => {
if (child.needsChildrenRefresh) {
return child.doRefresh(recursive, true);
} else {
child.updateVisibility();
return WinJS.TPromise.as(null);
}
}));
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册