1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Further reorganising of indexeddb sync code

* Make sync communicate with the sync accumulator via the store
 * Consequently get rid of getSyncAccumulator as it's now
   unnecessary.
 * Make the bit that gets the saved sync response async, because
   we'll need it to be when it's coming over postMessage from a
   webworker.
This commit is contained in:
David Baker
2017-03-31 18:18:53 +01:00
parent aebbe4f254
commit c0bd2c8945
5 changed files with 55 additions and 62 deletions

View File

@@ -164,8 +164,6 @@ function MatrixClient(opts) {
this.olmVersion = Crypto.getOlmVersion();
}
this._syncAccumulator = this.store.getSyncAccumulator();
}
utils.inherits(MatrixClient, EventEmitter);
utils.extend(MatrixClient.prototype, MatrixBaseApis.prototype);
@@ -2789,7 +2787,6 @@ MatrixClient.prototype.startClient = function(opts) {
opts = Object.assign({}, opts);
opts.crypto = this._crypto;
opts.syncAccumulator = this._syncAccumulator;
opts.canResetEntireTimeline = (roomId) => {
if (!this._canResetTimelineCallback) {
return false;