Change mascot popup key

This will ensure old users will still see the popups, even if they dismissed the old banners.
Este commit está contenido en:
Arnaud Vergnet 2020-08-14 17:45:49 +02:00
padre faea54487a
commit 2bcbe36f2f
Se han modificado 10 ficheros con 31 adiciones y 31 borrados

Ver fichero

@ -41,40 +41,40 @@ export default class AsyncStorageManager {
key: 'defaultStartScreen',
default: 'home',
},
servicesShowBanner: {
key: 'servicesShowBanner',
servicesShowMascot: {
key: 'servicesShowMascot',
default: '1',
},
proxiwashShowBanner: {
key: 'proxiwashShowBanner',
proxiwashShowMascot: {
key: 'proxiwashShowMascot',
default: '1',
},
homeShowBanner: {
key: 'homeShowBanner',
homeShowMascot: {
key: 'homeShowMascot',
default: '1',
},
eventsShowBanner: {
key: 'eventsShowBanner',
eventsShowMascot: {
key: 'eventsShowMascot',
default: '1',
},
planexShowBanner: {
key: 'planexShowBanner',
planexShowMascot: {
key: 'planexShowMascot',
default: '1',
},
loginShowBanner: {
key: 'loginShowBanner',
loginShowMascot: {
key: 'loginShowMascot',
default: '1',
},
voteShowBanner: {
key: 'voteShowBanner',
voteShowMascot: {
key: 'voteShowMascot',
default: '1',
},
equipmentShowBanner: {
key: 'equipmentShowBanner',
equipmentShowMascot: {
key: 'equipmentShowMascot',
default: '1',
},
gameStartShowBanner: {
key: 'gameStartShowBanner',
gameStartMascot: {
key: 'gameStartMascot',
default: '1',
},
proxiwashWatchedMachines: {

Ver fichero

@ -49,7 +49,7 @@ class EquipmentListScreen extends React.Component<PropsType, StateType> {
super(props);
this.state = {
mascotDialogVisible: AsyncStorageManager.getBool(
AsyncStorageManager.PREFERENCES.equipmentShowBanner.key,
AsyncStorageManager.PREFERENCES.equipmentShowMascot.key,
),
};
this.canRefresh = false;
@ -141,7 +141,7 @@ class EquipmentListScreen extends React.Component<PropsType, StateType> {
hideMascotDialog = () => {
AsyncStorageManager.set(
AsyncStorageManager.PREFERENCES.equipmentShowBanner.key,
AsyncStorageManager.PREFERENCES.equipmentShowMascot.key,
false,
);
this.setState({mascotDialogVisible: false});

Ver fichero

@ -91,7 +91,7 @@ class LoginScreen extends React.Component<PropsType, StateType> {
dialogVisible: false,
dialogError: 0,
mascotDialogVisible: AsyncStorageManager.getBool(
AsyncStorageManager.PREFERENCES.loginShowBanner.key,
AsyncStorageManager.PREFERENCES.loginShowMascot.key,
),
};
}
@ -293,7 +293,7 @@ class LoginScreen extends React.Component<PropsType, StateType> {
hideMascotDialog = () => {
AsyncStorageManager.set(
AsyncStorageManager.PREFERENCES.loginShowBanner.key,
AsyncStorageManager.PREFERENCES.loginShowMascot.key,
false,
);
this.setState({mascotDialogVisible: false});
@ -327,7 +327,7 @@ class LoginScreen extends React.Component<PropsType, StateType> {
const {navigation} = this.props;
// Do not show the home login banner again
AsyncStorageManager.set(
AsyncStorageManager.PREFERENCES.homeShowBanner.key,
AsyncStorageManager.PREFERENCES.homeShowMascot.key,
false,
);
if (this.nextScreen == null) navigation.goBack();

Ver fichero

@ -127,7 +127,7 @@ export default class VoteScreen extends React.Component<PropsType, StateType> {
this.state = {
hasVoted: false,
mascotDialogVisible: AsyncStorageManager.getBool(
AsyncStorageManager.PREFERENCES.voteShowBanner.key,
AsyncStorageManager.PREFERENCES.voteShowMascot.key,
),
};
this.hasVoted = false;
@ -309,7 +309,7 @@ export default class VoteScreen extends React.Component<PropsType, StateType> {
hideMascotDialog = () => {
AsyncStorageManager.set(
AsyncStorageManager.PREFERENCES.voteShowBanner.key,
AsyncStorageManager.PREFERENCES.voteShowMascot.key,
false,
);
this.setState({mascotDialogVisible: false});

Ver fichero

@ -420,7 +420,7 @@ class GameStartScreen extends React.Component<PropsType> {
<CollapsibleScrollView>
{this.getMainContent()}
<MascotPopup
prefKey={AsyncStorageManager.PREFERENCES.gameStartShowBanner.key}
prefKey={AsyncStorageManager.PREFERENCES.gameStartMascot.key}
title={i18n.t('screens.game.mascotDialog.title')}
message={i18n.t('screens.game.mascotDialog.message')}
icon="gamepad-variant"

Ver fichero

@ -488,7 +488,7 @@ class HomeScreen extends React.Component<PropsType, StateType> {
</View>
{!this.isLoggedIn ? (
<MascotPopup
prefKey={AsyncStorageManager.PREFERENCES.homeShowBanner.key}
prefKey={AsyncStorageManager.PREFERENCES.homeShowMascot.key}
title={i18n.t('screens.home.mascotDialog.title')}
message={i18n.t('screens.home.mascotDialog.message')}
icon="human-greeting"

Ver fichero

@ -361,7 +361,7 @@ class PlanexScreen extends React.Component<PropsType, StateType> {
AsyncStorageManager.PREFERENCES.defaultStartScreen.key,
).toLowerCase() !== 'planex' ? (
<MascotPopup
prefKey={AsyncStorageManager.PREFERENCES.planexShowBanner.key}
prefKey={AsyncStorageManager.PREFERENCES.planexShowMascot.key}
title={i18n.t('screens.planex.mascotDialog.title')}
message={i18n.t('screens.planex.mascotDialog.message')}
icon="emoticon-kiss"

Ver fichero

@ -262,7 +262,7 @@ class PlanningScreen extends React.Component<PropsType, StateType> {
onRef={this.onAgendaRef}
/>
<MascotPopup
prefKey={AsyncStorageManager.PREFERENCES.eventsShowBanner.key}
prefKey={AsyncStorageManager.PREFERENCES.eventsShowMascot.key}
title={i18n.t('screens.planning.mascotDialog.title')}
message={i18n.t('screens.planning.mascotDialog.message')}
icon="party-popper"

Ver fichero

@ -457,7 +457,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
/>
</View>
<MascotPopup
prefKey={AsyncStorageManager.PREFERENCES.proxiwashShowBanner.key}
prefKey={AsyncStorageManager.PREFERENCES.proxiwashShowMascot.key}
title={i18n.t('screens.proxiwash.mascotDialog.title')}
message={i18n.t('screens.proxiwash.mascotDialog.message')}
icon="information"

Ver fichero

@ -139,7 +139,7 @@ class ServicesScreen extends React.Component<PropsType> {
hasTab
/>
<MascotPopup
prefKey={AsyncStorageManager.PREFERENCES.servicesShowBanner.key}
prefKey={AsyncStorageManager.PREFERENCES.servicesShowMascot.key}
title={i18n.t('screens.services.mascotDialog.title')}
message={i18n.t('screens.services.mascotDialog.message')}
icon="cloud-question"