|
@@ -12,6 +12,7 @@ import {createStackNavigator} from '@react-navigation/stack';
|
12
|
12
|
import DrawerNavigator from './navigation/DrawerNavigator';
|
13
|
13
|
import NotificationsManager from "./utils/NotificationsManager";
|
14
|
14
|
import {Provider as PaperProvider} from 'react-native-paper';
|
|
15
|
+import AprilFoolsManager from "./utils/AprilFoolsManager";
|
15
|
16
|
|
16
|
17
|
type Props = {};
|
17
|
18
|
|
|
@@ -19,6 +20,7 @@ type State = {
|
19
|
20
|
isLoading: boolean,
|
20
|
21
|
showIntro: boolean,
|
21
|
22
|
showUpdate: boolean,
|
|
23
|
+ showAprilFools: boolean,
|
22
|
24
|
currentTheme: ?Object,
|
23
|
25
|
};
|
24
|
26
|
|
|
@@ -30,6 +32,7 @@ export default class App extends React.Component<Props, State> {
|
30
|
32
|
isLoading: true,
|
31
|
33
|
showIntro: true,
|
32
|
34
|
showUpdate: true,
|
|
35
|
+ showAprilFools: false,
|
33
|
36
|
currentTheme: null,
|
34
|
37
|
};
|
35
|
38
|
|
|
@@ -68,9 +71,11 @@ export default class App extends React.Component<Props, State> {
|
68
|
71
|
this.setState({
|
69
|
72
|
showIntro: false,
|
70
|
73
|
showUpdate: false,
|
|
74
|
+ showAprilFools: false,
|
71
|
75
|
});
|
72
|
76
|
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showIntro.key, '0');
|
73
|
77
|
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showUpdate5.key, '0');
|
|
78
|
+ AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.key, '0');
|
74
|
79
|
}
|
75
|
80
|
|
76
|
81
|
async componentDidMount() {
|
|
@@ -96,7 +101,8 @@ export default class App extends React.Component<Props, State> {
|
96
|
101
|
isLoading: false,
|
97
|
102
|
currentTheme: ThemeManager.getCurrentTheme(),
|
98
|
103
|
showIntro: AsyncStorageManager.getInstance().preferences.showIntro.current === '1',
|
99
|
|
- showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate5.current === '1'
|
|
104
|
+ showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate5.current === '1',
|
|
105
|
+ showAprilFools: AprilFoolsManager.getInstance().isAprilFoolsEnabled() && AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.current === '1',
|
100
|
106
|
});
|
101
|
107
|
// Status bar goes dark if set too fast
|
102
|
108
|
setTimeout(this.setupStatusBar, 1000);
|
|
@@ -109,9 +115,12 @@ export default class App extends React.Component<Props, State> {
|
109
|
115
|
render() {
|
110
|
116
|
if (this.state.isLoading) {
|
111
|
117
|
return null;
|
112
|
|
- } else if (this.state.showIntro || this.state.showUpdate) {
|
113
|
|
- return <CustomIntroSlider onDone={this.onIntroDone}
|
114
|
|
- isUpdate={this.state.showUpdate && !this.state.showIntro}/>;
|
|
118
|
+ } else if (this.state.showIntro || this.state.showUpdate || this.state.showAprilFools) {
|
|
119
|
+ return <CustomIntroSlider
|
|
120
|
+ onDone={this.onIntroDone}
|
|
121
|
+ isUpdate={this.state.showUpdate && !this.state.showIntro}
|
|
122
|
+ isAprilFools={this.state.showAprilFools && !this.state.showIntro}
|
|
123
|
+ />;
|
115
|
124
|
} else {
|
116
|
125
|
|
117
|
126
|
return (
|