This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -500,10 +500,9 @@ module.exports = React.createClass({
500
500
break ;
501
501
case 'on_logging_in' :
502
502
// We are now logging in, so set the state to reflect that
503
- // and also that we're not ready (we'll be marked as logged
504
- // in once the login completes, then ready once the sync
505
- // completes).
506
- this . setState ( { loggingIn : true , ready : false } ) ;
503
+ // NB. This does not touch 'ready' since if our dispatches
504
+ // are delayed, the sync could already have completed
505
+ this . setState ( { loggingIn : true } ) ;
507
506
break ;
508
507
case 'on_logged_in' :
509
508
this . _onLoggedIn ( payload . teamToken ) ;
@@ -989,6 +988,10 @@ module.exports = React.createClass({
989
988
*/
990
989
_onWillStartClient ( ) {
991
990
const self = this ;
991
+ // if the client is about to start, we are, by definition, not ready.
992
+ // Set ready to false now, then it'll be set to true when the sync
993
+ // listener we set below fires.
994
+ this . setState ( { ready : false } ) ;
992
995
const cli = MatrixClientPeg . get ( ) ;
993
996
994
997
// Allow the JS SDK to reap timeline events. This reduces the amount of
You can’t perform that action at this time.
0 commit comments