Skip to content

Commit

Permalink
Merge pull request #1566 from tgodzik/disable-release-notes
Browse files Browse the repository at this point in the history
improvement: Add disable release notes option
  • Loading branch information
tgodzik authored Dec 19, 2024
2 parents f345732 + 41755b1 commit 56aa2e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/metals-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@
"configuration": {
"title": "Metals",
"properties": {
"metals.disableReleaseNotes": {
"type": "boolean",
"default": false,
"scope": "machine",
"markdownDescription": "Do not show release notes when Metals was updated."
},
"metals.serverVersion": {
"type": "string",
"default": "1.4.2",
Expand Down
16 changes: 10 additions & 6 deletions packages/metals-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ export async function activate(context: ExtensionContext): Promise<void> {
}
);

await showReleaseNotes(
"onExtensionStart",
context,
serverVersion,
outputChannel
);
const disableReleaseNotes =
config.get<boolean>("disableReleaseNotes") ?? false;
if (!disableReleaseNotes) {
await showReleaseNotes(
"onExtensionStart",
context,
serverVersion,
outputChannel
);
}
}

function migrateOldSettings(): void {
Expand Down

0 comments on commit 56aa2e8

Please sign in to comment.