1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Don't be SYNCING until updating from the server

Syncing should probably mean the stream is up to date and
streaming messages in real-time from the server, which is not the
case if we've only loaded the cached response. Stay PREPARED until
we actually get the latest from the server.
This commit is contained in:
David Baker
2017-03-28 14:57:11 +01:00
parent f52e198b17
commit a38917f920

View File

@@ -605,7 +605,9 @@ SyncApi.prototype._sync = function(syncOptions) {
}
// keep emitting SYNCING -> SYNCING for clients who want to do bulk updates
self._updateSyncState("SYNCING", syncEventData);
if (!isCachedResponse) {
self._updateSyncState("SYNCING", syncEventData);
}
// tell databases that everything is now in a consistent state and can be
// saved.