Skip to content

Commit

Permalink
Tweak CES survey assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
digitarald committed Jan 26, 2022
1 parent 4506091 commit c9e64c3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vs/workbench/contrib/surveys/browser/ces.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ class CESContribution extends Disposable implements IWorkbenchContribution {
}

private async promptUser() {
const isCandidate = await this.tasExperimentService?.getTreatment<boolean>('CESSurvey');
if (!isCandidate) {
this.skipSurvey();
return;
}

const sendTelemetry = (userReaction: 'accept' | 'remindLater' | 'neverShowAgain' | 'cancelled') => {
/* __GDPR__
"cesSurvey:popup" : {
Expand Down Expand Up @@ -113,12 +119,6 @@ class CESContribution extends Disposable implements IWorkbenchContribution {
}

private async schedulePrompt(): Promise<void> {
const isCandidate = await this.tasExperimentService?.getTreatment<boolean>('CESSurvey');
if (!isCandidate) {
this.skipSurvey();
return;
}

let waitTimeToShowSurvey = 0;
const remindLaterDate = this.storageService.get(REMIND_LATER_DATE_KEY, StorageScope.GLOBAL, '');
if (remindLaterDate) {
Expand Down

0 comments on commit c9e64c3

Please sign in to comment.