INNER CODE UNIT · TypeScript
updateAndShowRatePopup
tim-koehler/Helm-Intellisense · src/extension.ts:63
async function updateAndShowRatePopup(context: vscode.ExtensionContext): Promise<void> {
if (context.globalState.get('ratePopupDisabled') === true) {
return;
}
const ratePopupValue = context.globalState.get('ratePopup');
if (ratePopupValue === undefined || typeof ratePopupValue !== 'number') {
context.globalState.update('ratePopup', 1);
return;
}
if (ratePopupValue as number < 50) {
context.globalState.update('ratePopup', ratePopupValue as number + 1);
return;
}
context.globalState.update('ratePopup', 1);
await vscode.window.showInformationMessage('If you like Helm-Intellisense, I would appreciate your support :)', 'Give a ⭐ on GitHub').then(selection => {