зеркало из https://github.com/mozilla/notes.git
On app active state only load from Kinto if online (#1260)
This commit is contained in:
Родитель
900e8c8846
Коммит
513ab73e33
|
@ -62,13 +62,10 @@ class ListPanel extends React.Component {
|
|||
// On opening the app, we check network stratus
|
||||
NetInfo.isConnected.fetch().then(isConnected => {
|
||||
props.dispatch(setNetInfo(isConnected));
|
||||
if (this.props.state.sync.loginDetails) {
|
||||
props.dispatch(kintoLoad()).then(() => {
|
||||
this.setState({ refreshing: false });
|
||||
}).catch(() => {
|
||||
this.setState({ refreshing: false });
|
||||
});
|
||||
if (this.props.state.sync.loginDetails && isConnected) {
|
||||
props.dispatch(kintoLoad());
|
||||
}
|
||||
this.setState({ refreshing: false });
|
||||
});
|
||||
} else {
|
||||
trackEvent('close', { state: nextAppState });
|
||||
|
|
Загрузка…
Ссылка в новой задаче