From bdc2c3d9adee7b2d2aad4c4b1359b650776c3318 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sat, 4 Jan 2020 20:04:57 +0100 Subject: [PATCH] cleanup: storage is not used in SyncWriter as the transaction is now always passed as an argument, it never creates one on its own. --- src/matrix/room/room.js | 2 +- src/matrix/room/timeline/persistence/SyncWriter.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/matrix/room/room.js b/src/matrix/room/room.js index a16816fb..387046fb 100644 --- a/src/matrix/room/room.js +++ b/src/matrix/room/room.js @@ -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; diff --git a/src/matrix/room/timeline/persistence/SyncWriter.js b/src/matrix/room/timeline/persistence/SyncWriter.js index 6e5701f2..5ba0de3f 100644 --- a/src/matrix/room/timeline/persistence/SyncWriter.js +++ b/src/matrix/room/timeline/persistence/SyncWriter.js @@ -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; }