提交 d4be66da 编写于 作者: E Eric Amodio

Fixes #112487 - avoid using stale cache for render

上级 d78fad38
...@@ -956,12 +956,12 @@ class ViewModel { ...@@ -956,12 +956,12 @@ class ViewModel {
private refresh(item?: IRepositoryItem | IGroupItem): void { private refresh(item?: IRepositoryItem | IGroupItem): void {
if (!this.alwaysShowRepositories && (this.items.size === 1 && (!item || isRepositoryItem(item)))) { if (!this.alwaysShowRepositories && (this.items.size === 1 && (!item || isRepositoryItem(item)))) {
const item = Iterable.first(this.items.values())!; const item = Iterable.first(this.items.values())!;
this.tree.setChildren(null, this.render(item, this._treeViewState).children); this.tree.setChildren(null, this.render(item, this.treeViewState).children);
} else if (item) { } else if (item) {
this.tree.setChildren(item.element, this.render(item, this._treeViewState).children); this.tree.setChildren(item.element, this.render(item, this.treeViewState).children);
} else { } else {
const items = coalesce(this.scmViewService.visibleRepositories.map(r => this.items.get(r))); const items = coalesce(this.scmViewService.visibleRepositories.map(r => this.items.get(r)));
this.tree.setChildren(null, items.map(item => this.render(item, this._treeViewState))); this.tree.setChildren(null, items.map(item => this.render(item, this.treeViewState)));
} }
this._onDidChangeRepositoryCollapseState.fire(); this._onDidChangeRepositoryCollapseState.fire();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册