[RN] Prepare for LoadingIndicator in LoginDialog
This commit is contained in:
parent
4e0761a46a
commit
70de9a683f
|
@ -52,6 +52,8 @@ export function authenticateAndUpgradeRole(
|
||||||
|
|
||||||
dispatch(_upgradeRoleFinished(error));
|
dispatch(_upgradeRoleFinished(error));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return process;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,18 +216,20 @@ class LoginDialog extends Component {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onLogin() {
|
_onLogin() {
|
||||||
const { _conference: conference } = this.props;
|
const { _conference: conference, dispatch } = this.props;
|
||||||
const { username, password } = this.state;
|
const { username, password } = this.state;
|
||||||
const jid = toJid(username, this.props._configHosts);
|
const jid = toJid(username, this.props._configHosts);
|
||||||
|
let r;
|
||||||
|
|
||||||
// If there's a conference it means that the connection has succeeded,
|
// If there's a conference it means that the connection has succeeded,
|
||||||
// but authentication is required in order to join the room.
|
// but authentication is required in order to join the room.
|
||||||
if (conference) {
|
if (conference) {
|
||||||
this.props.dispatch(
|
r = dispatch(authenticateAndUpgradeRole(jid, password, conference));
|
||||||
authenticateAndUpgradeRole(jid, password, conference));
|
|
||||||
} else {
|
} else {
|
||||||
this.props.dispatch(connect(jid, password));
|
r = dispatch(connect(jid, password));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ export function connect(id: ?string, password: ?string) {
|
||||||
JitsiConnectionEvents.CONNECTION_FAILED,
|
JitsiConnectionEvents.CONNECTION_FAILED,
|
||||||
_onConnectionFailed);
|
_onConnectionFailed);
|
||||||
|
|
||||||
connection.connect({
|
return connection.connect({
|
||||||
id,
|
id,
|
||||||
password
|
password
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue