mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
* Workaround for #78388 (twistie not updating on has children change) Fixes #78389
This commit is contained in:
@@ -597,8 +597,16 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
||||
private async doRefresh(elements: ITreeItem[]): Promise<void> {
|
||||
if (this.tree) {
|
||||
this.refreshing = true;
|
||||
await Promise.all(elements.map(element => this.tree.updateChildren(element, true)));
|
||||
elements.map(element => this.tree.rerender(element));
|
||||
const parents: Set<ITreeItem> = new Set<ITreeItem>();
|
||||
elements.forEach(element => {
|
||||
if (element !== this.root) {
|
||||
const parent = this.tree.getParentElement(element);
|
||||
parents.add(parent);
|
||||
} else {
|
||||
parents.add(element);
|
||||
}
|
||||
});
|
||||
await Promise.all(Array.from(parents.values()).map(element => this.tree.updateChildren(element, true)));
|
||||
this.refreshing = false;
|
||||
this.updateContentAreas();
|
||||
if (this.focused) {
|
||||
|
||||
Reference in New Issue
Block a user