diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index 4114e1a5f..ad2b88a89 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -136,6 +136,7 @@ class ApplicationContainer extends Component { await this._refreshGlobalProps(); this._getSettings(); await this._getUserData(); + this.setState({ isReady: true }); }; _handleConntectionChange = (status) => { @@ -264,8 +265,6 @@ class ApplicationContainer extends Component { if (response.nsfw !== '') dispatch(setNsfw(response.nsfw)); dispatch(setCurrency(response.currency !== '' ? response.currency : 'usd')); - - this.setState({ isReady: true }); } }); }; @@ -331,12 +330,13 @@ class ApplicationContainer extends Component { // || navigator.userLanguage // || selectedLanguage; - if (isRenderRequire && isReady) { + if (isRenderRequire) { return ( ); diff --git a/src/screens/application/screen/applicationScreen.js b/src/screens/application/screen/applicationScreen.js index 6415103d6..c02545812 100644 --- a/src/screens/application/screen/applicationScreen.js +++ b/src/screens/application/screen/applicationScreen.js @@ -1,6 +1,6 @@ -import React, { Component, Fragment } from 'react'; +import React, { Component } from 'react'; import { IntlProvider } from 'react-intl'; -import { StatusBar, Platform } from 'react-native'; +import { StatusBar, Platform, View } from 'react-native'; import EStyleSheet from 'react-native-extended-stylesheet'; import { ReduxNavigation } from '../../../navigation/reduxNavigation'; import { flattenMessages } from '../../../utils/flattenMessages'; @@ -43,14 +43,14 @@ class ApplicationScreen extends Component { render() { const { - isConnected, isDarkTheme, locale, toastNotification, + isConnected, isDarkTheme, locale, toastNotification, isReady, } = this.props; const { isShowToastNotification } = this.state; const barStyle = isDarkTheme ? 'light-content' : 'dark-content'; const barColor = isDarkTheme ? '#1e2835' : '#fff'; return ( - + {Platform.os === 'ios' ? ( ) : ( @@ -74,7 +74,7 @@ class ApplicationScreen extends Component { onHide={this._handleOnHideToastNotification} /> )} - + ); } }