Browse Source

Removes unneeded notification

main
Eric Amodio 2 years ago
parent
commit
c500717188
2 changed files with 0 additions and 30 deletions
  1. +0
    -19
      src/messages.ts
  2. +0
    -11
      src/plus/subscription/subscriptionService.ts

+ 0
- 19
src/messages.ts View File

@ -1,7 +1,6 @@
import type { MessageItem } from 'vscode';
import { ConfigurationTarget, env, Uri, window } from 'vscode';
import { configuration, SuppressedMessages } from './configuration';
import type { Container } from './container';
import type { GitCommit } from './git/models/commit';
import { Logger } from './logger';
@ -171,24 +170,6 @@ export function showIntegrationRequestTimedOutWarningMessage(providerName: strin
);
}
export async function showProDiscountNotification(container: Container): Promise<void> {
if (container.storage.get('plus:discountNotificationShown', false)) return;
void container.storage.store('plus:discountNotificationShown', true);
const upgrade: MessageItem = { title: 'Upgrade to Pro' };
const result = await showMessage(
'info',
'GitLens Pro introductory pricing, up to a 60% discount, goes away tomorrow. Upgrade to GitLens Pro now to access [GitLens+ features](command:gitlens.plus.learn) on private repos at a reduced rate.',
undefined,
undefined,
upgrade,
);
if (result === upgrade) {
void container.subscription.purchase();
}
}
export async function showWhatsNewMessage(version: string) {
const whatsnew = { title: "See What's New" };
const result = await showMessage(

+ 0
- 11
src/plus/subscription/subscriptionService.ts View File

@ -27,7 +27,6 @@ import { setContext } from '../../context';
import { AccountValidationError } from '../../errors';
import type { RepositoriesChangeEvent } from '../../git/gitProviderService';
import { Logger } from '../../logger';
import { showProDiscountNotification } from '../../messages';
import type { Subscription } from '../../subscription';
import {
computeSubscriptionState,
@ -901,16 +900,6 @@ export class SubscriptionService implements Disposable {
this._subscription = subscription;
this._etag = Date.now();
setTimeout(() => {
if (
new Date() < new Date('2022-10-18T00:00:00.000Z') &&
subscription!.account != null &&
!isSubscriptionPaid(subscription!)
) {
void showProDiscountNotification(this.container);
}
}, 5000);
if (!silent) {
this.updateContext();

Loading…
Cancel
Save