Skip to content

Commit 0c208b7

Browse files
Refresh subscription instead of group (#618)
1 parent 06277df commit 0c208b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/commands/registerCommands.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { commands } from 'vscode';
88
import { ext } from '../extensionVariables';
99
import { BranchDataItemWrapper } from '../tree/BranchDataProviderItem';
1010
import { ResourceGroupsItem } from '../tree/ResourceGroupsItem';
11+
import { GroupingItem } from '../tree/azure/GroupingItem';
1112
import { clearActivities } from './activities/clearActivities';
1213
import { createResource } from './createResource';
1314
import { createResourceGroup } from './createResourceGroup';
@@ -31,7 +32,12 @@ export function registerCommands(): void {
3132
// v1.5 client extensions attach these commands to tree item context menus for refreshing their tree items
3233
registerCommand('azureResourceGroups.refresh', async (context, node?: ResourceGroupsItem) => {
3334
await handleAzExtTreeItemRefresh(context, node); // for compatibility with v1.5 client extensions
34-
ext.actions.refreshAzureTree(node);
35+
36+
if (node instanceof GroupingItem) {
37+
ext.actions.refreshAzureTree(node.parent);
38+
} else {
39+
ext.actions.refreshAzureTree(node);
40+
}
3541
});
3642
registerCommand('azureWorkspace.refresh', async (context, node?: ResourceGroupsItem) => {
3743
await handleAzExtTreeItemRefresh(context, node); // for compatibility with v1.5 client extensions

0 commit comments

Comments
 (0)