mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
Don't potentially allow showing survey multiple times if user does not interact with a previously shown survey
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user