Skip to content

Commit

Permalink
Merge pull request #72 from fox-forks/hyperupcall-feat-disable-notif
Browse files Browse the repository at this point in the history
  • Loading branch information
amir9480 authored Dec 26, 2023
2 parents 9f6ddf8 + f14886f commit 2e3d815
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@
],
"default": "Implement in same file",
"description": "What happen if source file of a header file not found."
},
"CppHelper.showUpdateMessage": {
"type": "boolean",
"default": true,
"description": "Whether to show the update message when the extension updates."
}
}
}
Expand Down
23 changes: 13 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@ function showWelcomeMessage(context: vscode.ExtensionContext) {
message = "C++ Helper updated to " + currentVersion + ".";
}
if (message) {
vscode.window.showInformationMessage(message, '⭐️ Star on Github', '🐞 Report Bug')
.then(function (val: string | undefined) {
if (val === '⭐️ Rate') {
vscode.env.openExternal(vscode.Uri.parse('https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.cpp-helper&ssr=false#review-details'));
} else if (val === '🐞 Report Bug') {
vscode.env.openExternal(vscode.Uri.parse('https://github.com/amir9480/vscode-cpp-helper/issues'));
} else if (val === '⭐️ Star on Github') {
vscode.env.openExternal(vscode.Uri.parse('https://github.com/amir9480/vscode-cpp-helper'));
}
});
const showUpdateMessage = vscode.workspace.getConfiguration("CppHelper").get<boolean>('showUpdateMessage');
if (showUpdateMessage) {
vscode.window.showInformationMessage(message, '⭐️ Star on Github', '🐞 Report Bug')
.then(function (val: string | undefined) {
if (val === '⭐️ Rate') {
vscode.env.openExternal(vscode.Uri.parse('https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.cpp-helper&ssr=false#review-details'));
} else if (val === '🐞 Report Bug') {
vscode.env.openExternal(vscode.Uri.parse('https://github.com/amir9480/vscode-cpp-helper/issues'));
} else if (val === '⭐️ Star on Github') {
vscode.env.openExternal(vscode.Uri.parse('https://github.com/amir9480/vscode-cpp-helper'));
}
});
}
context.globalState.update('cpp-helper-version', currentVersion);
}
}
Expand Down

0 comments on commit 2e3d815

Please sign in to comment.