|
@@ -49,12 +49,9 @@ export default class App extends React.Component<Props, State> {
|
49
|
49
|
|
50
|
50
|
setupStatusBar() {
|
51
|
51
|
if (Platform.OS === 'ios') {
|
52
|
|
- console.log(ThemeManager.getNightMode());
|
53
|
52
|
if (ThemeManager.getNightMode()) {
|
54
|
|
- console.log('setting light mode');
|
55
|
53
|
StatusBar.setBarStyle('light-content', true);
|
56
|
54
|
} else {
|
57
|
|
- console.log('setting dark mode');
|
58
|
55
|
StatusBar.setBarStyle('dark-content', true);
|
59
|
56
|
}
|
60
|
57
|
}
|
|
@@ -73,7 +70,6 @@ export default class App extends React.Component<Props, State> {
|
73
|
70
|
}
|
74
|
71
|
|
75
|
72
|
async loadAssetsAsync() {
|
76
|
|
- console.log('Starting loading assets...');
|
77
|
73
|
// Wait for custom fonts to be loaded before showing the app
|
78
|
74
|
await Font.loadAsync({
|
79
|
75
|
'Roboto': require('native-base/Fonts/Roboto.ttf'),
|
|
@@ -83,18 +79,15 @@ export default class App extends React.Component<Props, State> {
|
83
|
79
|
await AsyncStorageManager.getInstance().loadPreferences();
|
84
|
80
|
ThemeManager.getInstance().setUpdateThemeCallback(() => this.updateTheme());
|
85
|
81
|
await NotificationsManager.initExpoToken();
|
86
|
|
- // console.log(AsyncStorageManager.getInstance().preferences.expoToken.current);
|
87
|
82
|
}
|
88
|
83
|
|
89
|
84
|
onLoadFinished() {
|
90
|
85
|
// Only show intro if this is the first time starting the app
|
91
|
|
- console.log('Finished loading');
|
92
|
86
|
this.setState({
|
93
|
87
|
isLoading: false,
|
94
|
88
|
currentTheme: ThemeManager.getCurrentTheme(),
|
95
|
89
|
showIntro: AsyncStorageManager.getInstance().preferences.showIntro.current === '1',
|
96
|
90
|
showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate5.current === '1'
|
97
|
|
- // showIntro: true
|
98
|
91
|
});
|
99
|
92
|
// Status bar goes dark if set too fast
|
100
|
93
|
setTimeout(this.setupStatusBar,
|