mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-06 05:07:29 +01:00
Fixes #112487 - avoid using stale cache for render
This commit is contained in:
1 parent
d78fad382a
commit
d4be66da20
1 file changed
+3
-3
@@ -956,12 +956,12 @@ class ViewModel {
|
||||
private refresh(item?: IRepositoryItem | IGroupItem): void {
|
||||
if (!this.alwaysShowRepositories && (this.items.size === 1 && (!item || isRepositoryItem(item)))) {
|
||||
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) {
|
||||
this.tree.setChildren(item.element, this.render(item, this._treeViewState).children);
|
||||
this.tree.setChildren(item.element, this.render(item, this.treeViewState).children);
|
||||
} else {
|
||||
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();
|
||||
|
||||
Reference in new issue
Block a user