Fix another infinite spin on register
Don't set ready on logging_in, set it before we start the client, as commented
This commit is contained in:
parent
a05ee01f28
commit
e15aedfeb2
1 changed files with 6 additions and 4 deletions
|
@ -533,12 +533,10 @@ module.exports = React.createClass({
|
|||
break;
|
||||
case 'on_logging_in':
|
||||
// We are now logging in, so set the state to reflect that
|
||||
// and also that we're not ready (we'll be marked as logged
|
||||
// in once the login completes, then ready once the sync
|
||||
// completes).
|
||||
// NB. This does not touch 'ready' since if our dispatches
|
||||
// are delayed, the sync could already have completed
|
||||
this.setStateForNewView({
|
||||
view: VIEWS.LOGGING_IN,
|
||||
ready: false,
|
||||
});
|
||||
break;
|
||||
case 'on_logged_in':
|
||||
|
@ -1012,6 +1010,10 @@ module.exports = React.createClass({
|
|||
*/
|
||||
_onWillStartClient() {
|
||||
const self = this;
|
||||
// if the client is about to start, we are, by definition, not ready.
|
||||
// Set ready to false now, then it'll be set to true when the sync
|
||||
// listener we set below fires.
|
||||
this.setState({ready: false});
|
||||
const cli = MatrixClientPeg.get();
|
||||
|
||||
// Allow the JS SDK to reap timeline events. This reduces the amount of
|
||||
|
|
Loading…
Reference in a new issue