From c9e64c346ef47d4ebc285791fcab438e794a8647 Mon Sep 17 00:00:00 2001 From: Harald Kirschner Date: Tue, 25 Jan 2022 21:59:39 -0800 Subject: [PATCH] Tweak CES survey assignment --- .../contrib/surveys/browser/ces.contribution.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/surveys/browser/ces.contribution.ts b/src/vs/workbench/contrib/surveys/browser/ces.contribution.ts index 125da89cf20c5..6c2dab8126833 100644 --- a/src/vs/workbench/contrib/surveys/browser/ces.contribution.ts +++ b/src/vs/workbench/contrib/surveys/browser/ces.contribution.ts @@ -57,6 +57,12 @@ class CESContribution extends Disposable implements IWorkbenchContribution { } private async promptUser() { + const isCandidate = await this.tasExperimentService?.getTreatment('CESSurvey'); + if (!isCandidate) { + this.skipSurvey(); + return; + } + const sendTelemetry = (userReaction: 'accept' | 'remindLater' | 'neverShowAgain' | 'cancelled') => { /* __GDPR__ "cesSurvey:popup" : { @@ -113,12 +119,6 @@ class CESContribution extends Disposable implements IWorkbenchContribution { } private async schedulePrompt(): Promise { - const isCandidate = await this.tasExperimentService?.getTreatment('CESSurvey'); - if (!isCandidate) { - this.skipSurvey(); - return; - } - let waitTimeToShowSurvey = 0; const remindLaterDate = this.storageService.get(REMIND_LATER_DATE_KEY, StorageScope.GLOBAL, ''); if (remindLaterDate) {