cleanup: storage is not used in SyncWriter

as the transaction is now always passed as an argument, it never
creates one on its own.
This commit is contained in:
Bruno Windels 2020-01-04 20:04:57 +01:00
parent 3b1ad40408
commit bdc2c3d9ad
2 changed files with 2 additions and 3 deletions

View file

@ -13,7 +13,7 @@ export default class Room extends EventEmitter {
this._hsApi = hsApi;
this._summary = new RoomSummary(roomId);
this._fragmentIdComparer = new FragmentIdComparer([]);
this._syncWriter = new SyncWriter({roomId, storage, fragmentIdComparer: this._fragmentIdComparer});
this._syncWriter = new SyncWriter({roomId, fragmentIdComparer: this._fragmentIdComparer});
this._emitCollectionChange = emitCollectionChange;
this._sendQueue = new SendQueue({roomId, storage, sendScheduler, pendingEvents});
this._timeline = null;

View file

@ -18,9 +18,8 @@ function deduplicateEvents(events) {
}
export default class SyncWriter {
constructor({roomId, storage, fragmentIdComparer}) {
constructor({roomId, fragmentIdComparer}) {
this._roomId = roomId;
this._storage = storage;
this._fragmentIdComparer = fragmentIdComparer;
this._lastLiveKey = null;
}