Browse Source

Change mascot popup key

This will ensure old users will still see the popups, even if they dismissed the old banners.
Arnaud Vergnet 3 years ago
parent
commit
2bcbe36f2f

+ 18
- 18
src/managers/AsyncStorageManager.js View File

41
       key: 'defaultStartScreen',
41
       key: 'defaultStartScreen',
42
       default: 'home',
42
       default: 'home',
43
     },
43
     },
44
-    servicesShowBanner: {
45
-      key: 'servicesShowBanner',
44
+    servicesShowMascot: {
45
+      key: 'servicesShowMascot',
46
       default: '1',
46
       default: '1',
47
     },
47
     },
48
-    proxiwashShowBanner: {
49
-      key: 'proxiwashShowBanner',
48
+    proxiwashShowMascot: {
49
+      key: 'proxiwashShowMascot',
50
       default: '1',
50
       default: '1',
51
     },
51
     },
52
-    homeShowBanner: {
53
-      key: 'homeShowBanner',
52
+    homeShowMascot: {
53
+      key: 'homeShowMascot',
54
       default: '1',
54
       default: '1',
55
     },
55
     },
56
-    eventsShowBanner: {
57
-      key: 'eventsShowBanner',
56
+    eventsShowMascot: {
57
+      key: 'eventsShowMascot',
58
       default: '1',
58
       default: '1',
59
     },
59
     },
60
-    planexShowBanner: {
61
-      key: 'planexShowBanner',
60
+    planexShowMascot: {
61
+      key: 'planexShowMascot',
62
       default: '1',
62
       default: '1',
63
     },
63
     },
64
-    loginShowBanner: {
65
-      key: 'loginShowBanner',
64
+    loginShowMascot: {
65
+      key: 'loginShowMascot',
66
       default: '1',
66
       default: '1',
67
     },
67
     },
68
-    voteShowBanner: {
69
-      key: 'voteShowBanner',
68
+    voteShowMascot: {
69
+      key: 'voteShowMascot',
70
       default: '1',
70
       default: '1',
71
     },
71
     },
72
-    equipmentShowBanner: {
73
-      key: 'equipmentShowBanner',
72
+    equipmentShowMascot: {
73
+      key: 'equipmentShowMascot',
74
       default: '1',
74
       default: '1',
75
     },
75
     },
76
-    gameStartShowBanner: {
77
-      key: 'gameStartShowBanner',
76
+    gameStartMascot: {
77
+      key: 'gameStartMascot',
78
       default: '1',
78
       default: '1',
79
     },
79
     },
80
     proxiwashWatchedMachines: {
80
     proxiwashWatchedMachines: {

+ 2
- 2
src/screens/Amicale/Equipment/EquipmentListScreen.js View File

49
     super(props);
49
     super(props);
50
     this.state = {
50
     this.state = {
51
       mascotDialogVisible: AsyncStorageManager.getBool(
51
       mascotDialogVisible: AsyncStorageManager.getBool(
52
-        AsyncStorageManager.PREFERENCES.equipmentShowBanner.key,
52
+        AsyncStorageManager.PREFERENCES.equipmentShowMascot.key,
53
       ),
53
       ),
54
     };
54
     };
55
     this.canRefresh = false;
55
     this.canRefresh = false;
141
 
141
 
142
   hideMascotDialog = () => {
142
   hideMascotDialog = () => {
143
     AsyncStorageManager.set(
143
     AsyncStorageManager.set(
144
-      AsyncStorageManager.PREFERENCES.equipmentShowBanner.key,
144
+      AsyncStorageManager.PREFERENCES.equipmentShowMascot.key,
145
       false,
145
       false,
146
     );
146
     );
147
     this.setState({mascotDialogVisible: false});
147
     this.setState({mascotDialogVisible: false});

+ 3
- 3
src/screens/Amicale/LoginScreen.js View File

91
       dialogVisible: false,
91
       dialogVisible: false,
92
       dialogError: 0,
92
       dialogError: 0,
93
       mascotDialogVisible: AsyncStorageManager.getBool(
93
       mascotDialogVisible: AsyncStorageManager.getBool(
94
-        AsyncStorageManager.PREFERENCES.loginShowBanner.key,
94
+        AsyncStorageManager.PREFERENCES.loginShowMascot.key,
95
       ),
95
       ),
96
     };
96
     };
97
   }
97
   }
293
 
293
 
294
   hideMascotDialog = () => {
294
   hideMascotDialog = () => {
295
     AsyncStorageManager.set(
295
     AsyncStorageManager.set(
296
-      AsyncStorageManager.PREFERENCES.loginShowBanner.key,
296
+      AsyncStorageManager.PREFERENCES.loginShowMascot.key,
297
       false,
297
       false,
298
     );
298
     );
299
     this.setState({mascotDialogVisible: false});
299
     this.setState({mascotDialogVisible: false});
327
     const {navigation} = this.props;
327
     const {navigation} = this.props;
328
     // Do not show the home login banner again
328
     // Do not show the home login banner again
329
     AsyncStorageManager.set(
329
     AsyncStorageManager.set(
330
-      AsyncStorageManager.PREFERENCES.homeShowBanner.key,
330
+      AsyncStorageManager.PREFERENCES.homeShowMascot.key,
331
       false,
331
       false,
332
     );
332
     );
333
     if (this.nextScreen == null) navigation.goBack();
333
     if (this.nextScreen == null) navigation.goBack();

+ 2
- 2
src/screens/Amicale/VoteScreen.js View File

127
     this.state = {
127
     this.state = {
128
       hasVoted: false,
128
       hasVoted: false,
129
       mascotDialogVisible: AsyncStorageManager.getBool(
129
       mascotDialogVisible: AsyncStorageManager.getBool(
130
-        AsyncStorageManager.PREFERENCES.voteShowBanner.key,
130
+        AsyncStorageManager.PREFERENCES.voteShowMascot.key,
131
       ),
131
       ),
132
     };
132
     };
133
     this.hasVoted = false;
133
     this.hasVoted = false;
309
 
309
 
310
   hideMascotDialog = () => {
310
   hideMascotDialog = () => {
311
     AsyncStorageManager.set(
311
     AsyncStorageManager.set(
312
-      AsyncStorageManager.PREFERENCES.voteShowBanner.key,
312
+      AsyncStorageManager.PREFERENCES.voteShowMascot.key,
313
       false,
313
       false,
314
     );
314
     );
315
     this.setState({mascotDialogVisible: false});
315
     this.setState({mascotDialogVisible: false});

+ 1
- 1
src/screens/Game/screens/GameStartScreen.js View File

420
           <CollapsibleScrollView>
420
           <CollapsibleScrollView>
421
             {this.getMainContent()}
421
             {this.getMainContent()}
422
             <MascotPopup
422
             <MascotPopup
423
-              prefKey={AsyncStorageManager.PREFERENCES.gameStartShowBanner.key}
423
+              prefKey={AsyncStorageManager.PREFERENCES.gameStartMascot.key}
424
               title={i18n.t('screens.game.mascotDialog.title')}
424
               title={i18n.t('screens.game.mascotDialog.title')}
425
               message={i18n.t('screens.game.mascotDialog.message')}
425
               message={i18n.t('screens.game.mascotDialog.message')}
426
               icon="gamepad-variant"
426
               icon="gamepad-variant"

+ 1
- 1
src/screens/Home/HomeScreen.js View File

488
         </View>
488
         </View>
489
         {!this.isLoggedIn ? (
489
         {!this.isLoggedIn ? (
490
           <MascotPopup
490
           <MascotPopup
491
-            prefKey={AsyncStorageManager.PREFERENCES.homeShowBanner.key}
491
+            prefKey={AsyncStorageManager.PREFERENCES.homeShowMascot.key}
492
             title={i18n.t('screens.home.mascotDialog.title')}
492
             title={i18n.t('screens.home.mascotDialog.title')}
493
             message={i18n.t('screens.home.mascotDialog.message')}
493
             message={i18n.t('screens.home.mascotDialog.message')}
494
             icon="human-greeting"
494
             icon="human-greeting"

+ 1
- 1
src/screens/Planex/PlanexScreen.js View File

361
           AsyncStorageManager.PREFERENCES.defaultStartScreen.key,
361
           AsyncStorageManager.PREFERENCES.defaultStartScreen.key,
362
         ).toLowerCase() !== 'planex' ? (
362
         ).toLowerCase() !== 'planex' ? (
363
           <MascotPopup
363
           <MascotPopup
364
-            prefKey={AsyncStorageManager.PREFERENCES.planexShowBanner.key}
364
+            prefKey={AsyncStorageManager.PREFERENCES.planexShowMascot.key}
365
             title={i18n.t('screens.planex.mascotDialog.title')}
365
             title={i18n.t('screens.planex.mascotDialog.title')}
366
             message={i18n.t('screens.planex.mascotDialog.message')}
366
             message={i18n.t('screens.planex.mascotDialog.message')}
367
             icon="emoticon-kiss"
367
             icon="emoticon-kiss"

+ 1
- 1
src/screens/Planning/PlanningScreen.js View File

262
           onRef={this.onAgendaRef}
262
           onRef={this.onAgendaRef}
263
         />
263
         />
264
         <MascotPopup
264
         <MascotPopup
265
-          prefKey={AsyncStorageManager.PREFERENCES.eventsShowBanner.key}
265
+          prefKey={AsyncStorageManager.PREFERENCES.eventsShowMascot.key}
266
           title={i18n.t('screens.planning.mascotDialog.title')}
266
           title={i18n.t('screens.planning.mascotDialog.title')}
267
           message={i18n.t('screens.planning.mascotDialog.message')}
267
           message={i18n.t('screens.planning.mascotDialog.message')}
268
           icon="party-popper"
268
           icon="party-popper"

+ 1
- 1
src/screens/Proxiwash/ProxiwashScreen.js View File

457
           />
457
           />
458
         </View>
458
         </View>
459
         <MascotPopup
459
         <MascotPopup
460
-          prefKey={AsyncStorageManager.PREFERENCES.proxiwashShowBanner.key}
460
+          prefKey={AsyncStorageManager.PREFERENCES.proxiwashShowMascot.key}
461
           title={i18n.t('screens.proxiwash.mascotDialog.title')}
461
           title={i18n.t('screens.proxiwash.mascotDialog.title')}
462
           message={i18n.t('screens.proxiwash.mascotDialog.message')}
462
           message={i18n.t('screens.proxiwash.mascotDialog.message')}
463
           icon="information"
463
           icon="information"

+ 1
- 1
src/screens/Services/ServicesScreen.js View File

139
           hasTab
139
           hasTab
140
         />
140
         />
141
         <MascotPopup
141
         <MascotPopup
142
-          prefKey={AsyncStorageManager.PREFERENCES.servicesShowBanner.key}
142
+          prefKey={AsyncStorageManager.PREFERENCES.servicesShowMascot.key}
143
           title={i18n.t('screens.services.mascotDialog.title')}
143
           title={i18n.t('screens.services.mascotDialog.title')}
144
           message={i18n.t('screens.services.mascotDialog.message')}
144
           message={i18n.t('screens.services.mascotDialog.message')}
145
           icon="cloud-question"
145
           icon="cloud-question"

Loading…
Cancel
Save