avoid unnecessary connections in azure view (#20817)

* avoid unnecessary connections in azure view

* pr comments
This commit is contained in:
Alan Ren
2022-10-12 20:00:09 -07:00
committed by GitHub
parent 51d5f07c77
commit 359e9657c5
3 changed files with 18 additions and 32 deletions

View File

@@ -19,7 +19,7 @@ CommandsRegistry.registerCommand({
handler: (accessor, args: TreeViewItemHandleArg) => {
if (args.$treeItem) {
const oeService = accessor.get(IOEShimService);
return oeService.disconnectNode(args.$treeViewId, args.$treeItem).then(() => {
return oeService.disconnectNode(args.$treeItem).then(() => {
const { treeView } = (<ICustomViewDescriptor>Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).getView(args.$treeViewId));
// we need to collapse it then refresh it so that the tree doesn't try and use it's cache next time the user expands the node
treeView.collapse(args.$treeItem);