mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-03 11:34:30 +03:00
Fixed theme issue
This commit is contained in:
parent
ed8e47bdd7
commit
8aefa43e31
@ -38,7 +38,6 @@ import {
|
|||||||
setAuthStatus,
|
setAuthStatus,
|
||||||
removeSCAccount,
|
removeSCAccount,
|
||||||
setExistUser,
|
setExistUser,
|
||||||
setDefaultFooter,
|
|
||||||
} from '../../../realm/realm';
|
} from '../../../realm/realm';
|
||||||
import { getUser } from '../../../providers/steem/dsteem';
|
import { getUser } from '../../../providers/steem/dsteem';
|
||||||
import { switchAccount } from '../../../providers/steem/auth';
|
import { switchAccount } from '../../../providers/steem/auth';
|
||||||
@ -82,6 +81,7 @@ class ApplicationContainer extends Component {
|
|||||||
isRenderRequire: true,
|
isRenderRequire: true,
|
||||||
isReady: false,
|
isReady: false,
|
||||||
isIos: Platform.OS !== 'android',
|
isIos: Platform.OS !== 'android',
|
||||||
|
isThemeReady: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,6 +265,8 @@ class ApplicationContainer extends Component {
|
|||||||
if (response.nsfw !== '') dispatch(setNsfw(response.nsfw));
|
if (response.nsfw !== '') dispatch(setNsfw(response.nsfw));
|
||||||
|
|
||||||
dispatch(setCurrency(response.currency !== '' ? response.currency : 'usd'));
|
dispatch(setCurrency(response.currency !== '' ? response.currency : 'usd'));
|
||||||
|
|
||||||
|
this.setState({ isThemeReady: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -322,7 +324,7 @@ class ApplicationContainer extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedLanguage, isConnected, toastNotification } = this.props;
|
const { selectedLanguage, isConnected, toastNotification } = this.props;
|
||||||
const { isRenderRequire, isReady } = this.state;
|
const { isRenderRequire, isReady, isThemeReady } = this.state;
|
||||||
|
|
||||||
// For testing It comented out.
|
// For testing It comented out.
|
||||||
// const locale = (navigator.languages && navigator.languages[0])
|
// const locale = (navigator.languages && navigator.languages[0])
|
||||||
@ -330,7 +332,7 @@ class ApplicationContainer extends Component {
|
|||||||
// || navigator.userLanguage
|
// || navigator.userLanguage
|
||||||
// || selectedLanguage;
|
// || selectedLanguage;
|
||||||
|
|
||||||
if (isRenderRequire) {
|
if (isRenderRequire && isThemeReady) {
|
||||||
return (
|
return (
|
||||||
<ApplicationScreen
|
<ApplicationScreen
|
||||||
isConnected={isConnected}
|
isConnected={isConnected}
|
||||||
|
Loading…
Reference in New Issue
Block a user