You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Make indexeddb save after the first sync
Save the sync data to indexeddb after the first catch-up Fixes https://github.com/vector-im/riot-web/issues/3527
This commit is contained in:
@@ -620,11 +620,13 @@ SyncApi.prototype._sync = function(syncOptions) {
|
||||
// keep emitting SYNCING -> SYNCING for clients who want to do bulk updates
|
||||
if (!isCachedResponse) {
|
||||
self._updateSyncState("SYNCING", syncEventData);
|
||||
|
||||
// tell databases that everything is now in a consistent state and can be
|
||||
// saved (no point doing so if we only have the data we just got out of the
|
||||
// store).
|
||||
client.store.save();
|
||||
}
|
||||
|
||||
// tell databases that everything is now in a consistent state and can be
|
||||
// saved.
|
||||
client.store.save();
|
||||
|
||||
// Begin next sync
|
||||
self._sync(syncOptions);
|
||||
|
||||
Reference in New Issue
Block a user