Merge pull request #1041 from matrix-org/dbkr/reset_first_sync_promise

Reset 'first sync' flag / promise on log in
This commit is contained in:
David Baker 2017-06-06 11:43:28 +01:00 committed by GitHub
commit 9c30de0eaa

View File

@ -927,6 +927,10 @@ module.exports = React.createClass({
dis.dispatch({action: 'view_home_page'}); dis.dispatch({action: 'view_home_page'});
} else if (this._is_registered) { } else if (this._is_registered) {
this._is_registered = false; this._is_registered = false;
// reset the 'have completed first sync' flag,
// since we've just logged in and will be about to sync
this.firstSyncComplete = false;
this.firstSyncPromise = q.defer();
// Set the display name = user ID localpart // Set the display name = user ID localpart
MatrixClientPeg.get().setDisplayName( MatrixClientPeg.get().setDisplayName(