Skip to content

Commit

Permalink
Merge pull request #3083 from zowe/fix/v3/config-watcher
Browse files Browse the repository at this point in the history
fix(v3): `onProfilesUpdate` does not always fire for extenders
  • Loading branch information
zFernand0 authored Sep 3, 2024
2 parents 824f7a7 + 07d9276 commit 694498b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Fixed an issue where upgrading from Zowe Explorer v1 and selecting "Reload Extensions" causes Zowe Explorer v3 to fail during initialization. [#3051](https://github.com/zowe/zowe-explorer-vscode/pull/3051)
- Fixed an issue where remote lookup functionality caused the local side of a conflict to be overwritten with the remote contents. [#3085](https://github.com/zowe/zowe-explorer-vscode/pull/3085)
- Fixed an issue where the remote conflict icons showed when using the "Compare with Selected" feature. [#3085](https://github.com/zowe/zowe-explorer-vscode/pull/3085)
- Resolved an issue where extender event callbacks were not always fired when the team configuration file was created, updated or deleted. [#3078](https://github.com/zowe/zowe-explorer-vscode/issues/3078)
- Update Zowe SDKs to `8.0.0-next.202408291544` for technical currency. [#3057](https://github.com/zowe/zowe-explorer-vscode/pull/3057)

## `3.0.0-next.202404242037`
Expand Down
10 changes: 5 additions & 5 deletions packages/zowe-explorer/src/trees/shared/SharedInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ export class SharedInit {
context.subscriptions.push(...watchers);

watchers.forEach((watcher) => {
watcher.onDidCreate(async () => {
watcher.onDidCreate(() => {
ZoweLogger.info(vscode.l10n.t("Team config file created, refreshing Zowe Explorer."));
await SharedActions.refreshAll();
void SharedActions.refreshAll();
ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(Validation.EventType.CREATE);
});
watcher.onDidDelete(async () => {
watcher.onDidDelete(() => {
ZoweLogger.info(vscode.l10n.t("Team config file deleted, refreshing Zowe Explorer."));
await SharedActions.refreshAll();
void SharedActions.refreshAll();
ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(Validation.EventType.DELETE);
});
watcher.onDidChange(async (uri: vscode.Uri) => {
Expand All @@ -337,7 +337,7 @@ export class SharedInit {
return;
}
Constants.SAVED_PROFILE_CONTENTS = newProfileContents;
await SharedActions.refreshAll();
void SharedActions.refreshAll();
ZoweExplorerApiRegister.getInstance().onProfilesUpdateEmitter.fire(Validation.EventType.UPDATE);
});
});
Expand Down

0 comments on commit 694498b

Please sign in to comment.