From 635f033193dc824c9cb506af3ef7946c522c07bc Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 20 Sep 2021 12:32:49 +0200 Subject: [PATCH] Added release notes notification --- src/helpers/Extension.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/helpers/Extension.ts b/src/helpers/Extension.ts index 01e04b29..c7a3c86e 100644 --- a/src/helpers/Extension.ts +++ b/src/helpers/Extension.ts @@ -33,18 +33,15 @@ export class Extension { const frontMatter = extensions.getExtension(this.isBetaVersion() ? EXTENSION_BETA_ID : EXTENSION_ID)!; let installedVersion = frontMatter.packageJSON.version; const usedVersion = this.ctx.globalState.get(EXTENSION_STATE_VERSION); - - if (usedVersion !== installedVersion) { - Notifications.info(`Check out the v${installedVersion} release notes at [v${installedVersion} release notes](https://beta.frontmatter.codes/updates/v${installedVersion.split('.').join('_')})`); - } if (this.isBetaVersion()) { installedVersion = `${installedVersion}-beta`; } - if (installedVersion) { + if (usedVersion !== installedVersion) { + Notifications.info(`Find out what is new at [v${installedVersion} release notes](https://${this.isBetaVersion() ? 'beta.' : ''}frontmatter.codes/updates/v${installedVersion.split('.').join('_')})`); this.setVersion(installedVersion); - }; + } return { usedVersion,