File tree 1 file changed +8
-3
lines changed
arduino-ide-extension/src/node
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { injectable } from '@theia/core/shared/inversify' ;
2
2
import { SurveyNotificationService } from '../common/protocol/survey-service' ;
3
3
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
+ */
4
8
@injectable ( )
5
9
export class SurveyNotificationServiceImpl
6
10
implements SurveyNotificationService
7
11
{
8
- private isSurveyShown = false ;
12
+ private surveyDidShow = false ;
9
13
async isFirstInstance ( ) : Promise < boolean > {
10
- if ( this . isSurveyShown ) {
14
+ if ( this . surveyDidShow ) {
11
15
return false ;
12
16
}
13
- return ( this . isSurveyShown = true ) ;
17
+ this . surveyDidShow = true ;
18
+ return this . surveyDidShow ;
14
19
}
15
20
}
You can’t perform that action at this time.
0 commit comments