forked from vergnet/application-amicale
Removed console.log for more performance
This commit is contained in:
parent
99eff7ebf5
commit
c3c99fbe3b
3 changed files with 0 additions and 10 deletions
7
App.js
7
App.js
|
@ -49,12 +49,9 @@ export default class App extends React.Component<Props, State> {
|
||||||
|
|
||||||
setupStatusBar() {
|
setupStatusBar() {
|
||||||
if (Platform.OS === 'ios') {
|
if (Platform.OS === 'ios') {
|
||||||
console.log(ThemeManager.getNightMode());
|
|
||||||
if (ThemeManager.getNightMode()) {
|
if (ThemeManager.getNightMode()) {
|
||||||
console.log('setting light mode');
|
|
||||||
StatusBar.setBarStyle('light-content', true);
|
StatusBar.setBarStyle('light-content', true);
|
||||||
} else {
|
} else {
|
||||||
console.log('setting dark mode');
|
|
||||||
StatusBar.setBarStyle('dark-content', true);
|
StatusBar.setBarStyle('dark-content', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +70,6 @@ export default class App extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadAssetsAsync() {
|
async loadAssetsAsync() {
|
||||||
console.log('Starting loading assets...');
|
|
||||||
// Wait for custom fonts to be loaded before showing the app
|
// Wait for custom fonts to be loaded before showing the app
|
||||||
await Font.loadAsync({
|
await Font.loadAsync({
|
||||||
'Roboto': require('native-base/Fonts/Roboto.ttf'),
|
'Roboto': require('native-base/Fonts/Roboto.ttf'),
|
||||||
|
@ -83,18 +79,15 @@ export default class App extends React.Component<Props, State> {
|
||||||
await AsyncStorageManager.getInstance().loadPreferences();
|
await AsyncStorageManager.getInstance().loadPreferences();
|
||||||
ThemeManager.getInstance().setUpdateThemeCallback(() => this.updateTheme());
|
ThemeManager.getInstance().setUpdateThemeCallback(() => this.updateTheme());
|
||||||
await NotificationsManager.initExpoToken();
|
await NotificationsManager.initExpoToken();
|
||||||
// console.log(AsyncStorageManager.getInstance().preferences.expoToken.current);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoadFinished() {
|
onLoadFinished() {
|
||||||
// Only show intro if this is the first time starting the app
|
// Only show intro if this is the first time starting the app
|
||||||
console.log('Finished loading');
|
|
||||||
this.setState({
|
this.setState({
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
currentTheme: ThemeManager.getCurrentTheme(),
|
currentTheme: ThemeManager.getCurrentTheme(),
|
||||||
showIntro: AsyncStorageManager.getInstance().preferences.showIntro.current === '1',
|
showIntro: AsyncStorageManager.getInstance().preferences.showIntro.current === '1',
|
||||||
showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate5.current === '1'
|
showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate5.current === '1'
|
||||||
// showIntro: true
|
|
||||||
});
|
});
|
||||||
// Status bar goes dark if set too fast
|
// Status bar goes dark if set too fast
|
||||||
setTimeout(this.setupStatusBar,
|
setTimeout(this.setupStatusBar,
|
||||||
|
|
|
@ -319,14 +319,12 @@ export default class AboutScreen extends React.Component<Props, State> {
|
||||||
|
|
||||||
tryUnlockDebugMode() {
|
tryUnlockDebugMode() {
|
||||||
this.debugTapCounter = this.debugTapCounter + 1;
|
this.debugTapCounter = this.debugTapCounter + 1;
|
||||||
console.log(this.debugTapCounter);
|
|
||||||
if (this.debugTapCounter >= 4) {
|
if (this.debugTapCounter >= 4) {
|
||||||
this.unlockDebugMode();
|
this.unlockDebugMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unlockDebugMode() {
|
unlockDebugMode() {
|
||||||
console.log('unlocked');
|
|
||||||
this.setState({isDebugUnlocked: true});
|
this.setState({isDebugUnlocked: true});
|
||||||
let key = AsyncStorageManager.getInstance().preferences.debugUnlocked.key;
|
let key = AsyncStorageManager.getInstance().preferences.debugUnlocked.key;
|
||||||
AsyncStorageManager.getInstance().savePref(key, '1');
|
AsyncStorageManager.getInstance().savePref(key, '1');
|
||||||
|
|
|
@ -83,7 +83,6 @@ export default class DebugScreen extends React.Component<Props, State> {
|
||||||
|
|
||||||
alertCurrentExpoToken() {
|
alertCurrentExpoToken() {
|
||||||
let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
|
let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
|
||||||
console.log(token);
|
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'Expo Token',
|
'Expo Token',
|
||||||
token,
|
token,
|
||||||
|
|
Loading…
Reference in a new issue