Skip to content

Commit 226f0b8

Browse files
document the purpose of the service
1 parent 4a0e0cf commit 226f0b8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed
+8-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import { injectable } from '@theia/core/shared/inversify';
22
import { SurveyNotificationService } from '../common/protocol/survey-service';
33

4+
/**
5+
* Service for checking if it is the first instance of the IDE, in this case it sets a flag to true.
6+
* This flag is used to prevent the survey notification from being visible in every open window. It must only be shown on one window.
7+
*/
48
@injectable()
59
export class SurveyNotificationServiceImpl
610
implements SurveyNotificationService
711
{
8-
private isSurveyShown = false;
12+
private surveyDidShow = false;
913
async isFirstInstance(): Promise<boolean> {
10-
if (this.isSurveyShown) {
14+
if (this.surveyDidShow) {
1115
return false;
1216
}
13-
return (this.isSurveyShown = true);
17+
this.surveyDidShow = true;
18+
return this.surveyDidShow;
1419
}
1520
}

0 commit comments

Comments
 (0)