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

Fix #54315

上级 712cd009
...@@ -453,7 +453,13 @@ export class Item { ...@@ -453,7 +453,13 @@ export class Item {
private refreshChildren(recursive: boolean, safe: boolean = false, force: boolean = false): WinJS.Promise { private refreshChildren(recursive: boolean, safe: boolean = false, force: boolean = false): WinJS.Promise {
if (!force && !this.isExpanded()) { if (!force && !this.isExpanded()) {
this.needsChildrenRefresh = true; const setNeedsChildrenRefresh = (item: Item) => {
item.needsChildrenRefresh = true;
item.forEachChild(setNeedsChildrenRefresh);
};
setNeedsChildrenRefresh(this);
return WinJS.TPromise.as(this); return WinJS.TPromise.as(this);
} }
...@@ -511,8 +517,14 @@ export class Item { ...@@ -511,8 +517,14 @@ export class Item {
return child.doRefresh(recursive, true); return child.doRefresh(recursive, true);
})); }));
} else { } else {
this.mapEachChild(child => child.updateVisibility()); return WinJS.Promise.join(this.mapEachChild((child) => {
return WinJS.TPromise.as(null); 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.
先完成此消息的编辑!
想要评论请 注册