Merge pull request #1124 from matrix-org/dbkr/fix_register_infinite_spin
Fix another infinite spin on registerpull/21833/head
commit
a7775b283b
|
@ -533,12 +533,10 @@ module.exports = React.createClass({
|
||||||
break;
|
break;
|
||||||
case 'on_logging_in':
|
case 'on_logging_in':
|
||||||
// We are now logging in, so set the state to reflect that
|
// 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
|
// NB. This does not touch 'ready' since if our dispatches
|
||||||
// in once the login completes, then ready once the sync
|
// are delayed, the sync could already have completed
|
||||||
// completes).
|
|
||||||
this.setStateForNewView({
|
this.setStateForNewView({
|
||||||
view: VIEWS.LOGGING_IN,
|
view: VIEWS.LOGGING_IN,
|
||||||
ready: false,
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'on_logged_in':
|
case 'on_logged_in':
|
||||||
|
@ -1012,6 +1010,10 @@ module.exports = React.createClass({
|
||||||
*/
|
*/
|
||||||
_onWillStartClient() {
|
_onWillStartClient() {
|
||||||
const self = this;
|
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();
|
const cli = MatrixClientPeg.get();
|
||||||
|
|
||||||
// Allow the JS SDK to reap timeline events. This reduces the amount of
|
// Allow the JS SDK to reap timeline events. This reduces the amount of
|
||||||
|
|
Loading…
Reference in New Issue