Skip to content

Commit ae7e7e7

Browse files
committed
fix(notifications): add timeout to update and reload
Telemetry needs time to be sent, maybe other cleanup routines as well.
1 parent 2d90700 commit ae7e7e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/notifications/panelNode.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { registerToolView } from '../awsexplorer/activationShared'
1616
import { readonlyDocument } from '../shared/utilities/textDocumentUtilities'
1717
import { openUrl } from '../shared/utilities/vsCodeUtils'
1818
import { telemetry } from '../shared/telemetry/telemetry'
19+
import { globals } from '../shared'
1920

2021
/**
2122
* Controls the "Notifications" side panel/tree in each extension. It takes purely UX actions
@@ -207,7 +208,10 @@ export class NotificationsNode implements TreeNode {
207208
)
208209
break
209210
case 'updateAndReload':
210-
await this.updateAndReload(notification.displayIf.extensionId)
211+
// Give things time to finish executing.
212+
globals.clock.setTimeout(() => {
213+
void this.updateAndReload(notification.displayIf.extensionId)
214+
}, 1000)
211215
break
212216
case 'openUrl':
213217
if (selectedButton.url) {

0 commit comments

Comments
 (0)