From fd80f0de8aa68b2301e3e32bf66a87f7523982b4 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 19 Sep 2018 17:35:19 -0700 Subject: [PATCH] Don't potentially allow showing survey multiple times if user does not interact with a previously shown survey --- .../typescript-language-features/src/utils/surveyor.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/typescript-language-features/src/utils/surveyor.ts b/extensions/typescript-language-features/src/utils/surveyor.ts index df0c9fc1062..5e5658a4633 100644 --- a/extensions/typescript-language-features/src/utils/surveyor.ts +++ b/extensions/typescript-language-features/src/utils/surveyor.ts @@ -90,6 +90,10 @@ class Survey { return false; } + public willShow() { + this._hasShownInThisSession = true; + } + public markComplete() { this._hasShownInThisSession = true; this.memento.update(this.isCompletedMementoKey, true); @@ -131,6 +135,7 @@ export class Surveyor { public surveyReady(surveyId: string): void { const survey = this.tryGetActiveSurvey(surveyId); if (survey && survey.trigger()) { + survey.willShow(); this.showSurveyToUser(survey); } }