summaryrefslogtreecommitdiffstats
path: root/src/extension.ts
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2018-03-30 00:26:33 +0200
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-03-30 00:42:59 +0200
commit482ed941aab73230a560024e37c272b1b398b48a (patch)
tree43c03ee8e027dee44d5ff16573555b5ca759410a /src/extension.ts
parent45175bbc91fb48f05724b0fec773e309f3e976f3 (diff)
downloaddoxdocgen-0.3.1.tar.gz
Release 0.3.10.3.1
Diffstat (limited to 'src/extension.ts')
-rw-r--r--src/extension.ts17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/extension.ts b/src/extension.ts
index 99cc168..73be843 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -11,6 +11,12 @@ enum ConfigChangedNotificationOptions {
GLOBAL_STORAGE_KEY = "doxdocgen_hide_config_changed_notification",
}
+enum Version {
+ CURRENT = "0.3.1",
+ PREVIOUS = "0.3.0",
+ KEY = "doxdocgen_version",
+}
+
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
@@ -18,9 +24,18 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(parser);
+ let change: boolean = false;
+
+ const version = context.globalState.get<string>(Version.KEY);
+ if (version === undefined) {
+ context.globalState.update(Version.KEY, Version.CURRENT);
+ } else if (version !== Version.CURRENT) {
+ change = true;
+ }
+
let notificationHideThenable: Thenable<string>;
const active = context.globalState.get<string>(ConfigChangedNotificationOptions.GLOBAL_STORAGE_KEY);
- if (active === undefined || active !== "false") {
+ if (change && (active === undefined || active !== "false")) {
// tslint:disable-next-line:max-line-length
notificationHideThenable = vscode.window.showWarningMessage("DoxDocGen: Config keys have changed. Please check your config!", ConfigChangedNotificationOptions.CHANGED, ConfigChangedNotificationOptions.HIDE);
}