mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-03 11:34:30 +03:00
Fix for #809
This commit is contained in:
parent
1d136aa7d2
commit
ed8e47bdd7
@ -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 (
|
||||
<ApplicationScreen
|
||||
isConnected={isConnected}
|
||||
locale={selectedLanguage}
|
||||
toastNotification={toastNotification}
|
||||
isReady={isReady}
|
||||
{...this.props}
|
||||
/>
|
||||
);
|
||||
|
@ -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 (
|
||||
<Fragment>
|
||||
<View pointerEvents={isReady ? 'auto' : 'none'} style={{ flex: 1 }}>
|
||||
{Platform.os === 'ios' ? (
|
||||
<StatusBar barStyle={barStyle} />
|
||||
) : (
|
||||
@ -74,7 +74,7 @@ class ApplicationScreen extends Component {
|
||||
onHide={this._handleOnHideToastNotification}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user