Parcourir la source

Fixes #1351 stops showing whats new more than once

main
Eric Amodio il y a 3 ans
Parent
révision
f2843c771d
1 fichiers modifiés avec 12 ajouts et 4 suppressions
  1. +12
    -4
      src/extension.ts

+ 12
- 4
src/extension.ts Voir le fichier

@ -65,14 +65,22 @@ export async function activate(context: ExtensionContext): Promise
const gitlensVersion = gitlens.packageJSON.version;
const syncedVersion = context.globalState.get<string>(SyncedState.Version);
const previousVersion =
const localVersion =
context.globalState.get<string>(GlobalState.Version) ??
context.globalState.get<string>(GlobalState.Deprecated_Version) ??
syncedVersion;
context.globalState.get<string>(GlobalState.Deprecated_Version);
let previousVersion;
if (localVersion == null || syncedVersion == null) {
previousVersion = syncedVersion ?? localVersion;
} else if (Versions.compare(syncedVersion, localVersion) === 1) {
previousVersion = syncedVersion;
} else {
previousVersion = localVersion;
}
if (Logger.willLog('debug')) {
Logger.debug(
`GitLens (v${gitlensVersion}): syncedVersion=${syncedVersion}, previousVersion=${previousVersion}, ${
`GitLens (v${gitlensVersion}): syncedVersion=${syncedVersion}, localVersion=${localVersion}, previousVersion=${previousVersion}, ${
SyncedState.WelcomeViewVisible
}=${context.globalState.get<boolean>(SyncedState.WelcomeViewVisible)}, ${
SyncedState.UpdatesViewVisible

Chargement…
Annuler
Enregistrer