mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
Fixed no internet connection bugs
This commit is contained in:
parent
0438cfefa9
commit
aca7a6abed
@ -143,11 +143,7 @@ class ApplicationContainer extends Component {
|
||||
const { isConnected, dispatch } = this.props;
|
||||
if (state.isConnected !== isConnected) {
|
||||
dispatch(setConnectivityStatus(state.isConnected));
|
||||
if (state.isConnected) {
|
||||
this._fetchApp();
|
||||
} else {
|
||||
// no internet
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -441,7 +437,7 @@ class ApplicationContainer extends Component {
|
||||
};
|
||||
|
||||
_getSettings = async () => {
|
||||
const { dispatch } = this.props;
|
||||
const { dispatch, isConnected } = this.props;
|
||||
|
||||
const settings = await getSettings();
|
||||
|
||||
@ -463,7 +459,9 @@ class ApplicationContainer extends Component {
|
||||
}
|
||||
if (settings.nsfw !== '') dispatch(setNsfw(settings.nsfw));
|
||||
|
||||
if (isConnected) {
|
||||
dispatch(setCurrency(settings.currency !== '' ? settings.currency : 'usd'));
|
||||
}
|
||||
|
||||
this.setState({ isThemeReady: true });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user