From 12d24809160e6bae9ee8173f880ba921991efd03 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Jun 2017 11:36:33 +0100 Subject: [PATCH 1/2] Reset 'first sync' flag / promise on log in Otherwise on any logins after the first,we always think the first sync has completed. --- src/components/structures/MatrixChat.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index a1a6a50fd2..b863bf9cf2 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -927,6 +927,8 @@ module.exports = React.createClass({ dis.dispatch({action: 'view_home_page'}); } else if (this._is_registered) { this._is_registered = false; + this.firstSyncComplete = false; + this.firstSyncPromise = q.defer(); // Set the display name = user ID localpart MatrixClientPeg.get().setDisplayName( From c27f50207df3375556c079312b73076c646f8132 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Jun 2017 11:43:07 +0100 Subject: [PATCH 2/2] comment --- src/components/structures/MatrixChat.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index b863bf9cf2..c31912d798 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -927,6 +927,8 @@ module.exports = React.createClass({ dis.dispatch({action: 'view_home_page'}); } else if (this._is_registered) { 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();