Skip to content

Commit c5cdb71

Browse files
authored
Not to pop up out-dated release note automatically (#509)
Signed-off-by: Yan Zhang <[email protected]>
1 parent 73a1955 commit c5cdb71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/misc/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
import * as vscode from "vscode";
5-
import { getReleaseNotesEntries, findLatestReleaseNotes, timeToString } from "../utils";
5+
import { getReleaseNotesEntries, findLatestReleaseNotes, timeToString, getExtensionVersion } from "../utils";
66

77
export enum HelpViewType {
88
Auto = "auto",
@@ -32,6 +32,9 @@ const RELEASE_NOTE_PRESENTATION_HISTORY = "releaseNotesPresentationHistory";
3232
export async function showReleaseNotesOnStart(context: vscode.ExtensionContext) {
3333
const entries = await getReleaseNotesEntries(context);
3434
const latest = findLatestReleaseNotes(entries);
35+
if(latest.version !== getExtensionVersion()) {
36+
return; // in case we don't draft release note for a version.
37+
}
3538

3639
const history: ReleaseNotesPresentationHistoryEntry[] = context.globalState.get(RELEASE_NOTE_PRESENTATION_HISTORY) || [];
3740
if (history.some(entry => entry.version === latest.version)) {

0 commit comments

Comments
 (0)