Keep connection as active when retrying teams (#2314)

This commit is contained in:
Elias Nahum 2018-11-05 15:19:28 -03:00
parent a717ec1757
commit 76ed62b153
No known key found for this signature in database
GPG key ID: E038DB71E0B61702

View file

@ -67,13 +67,17 @@ export default class ErrorTeamsList extends PureComponent {
};
getUserInfo = async () => {
this.setState({loading: true});
this.props.actions.connection(true);
await this.props.actions.loadMe();
this.props.actions.connection(false);
this.setState({loading: false});
this.props.actions.selectDefaultTeam();
this.goToChannelView();
try {
this.setState({loading: true});
this.props.actions.connection(true);
await this.props.actions.loadMe();
this.props.actions.selectDefaultTeam();
this.goToChannelView();
} catch {
this.props.actions.connection(false);
} finally {
this.setState({loading: false});
}
}
onNavigatorEvent = (event) => {