From 56c87b3966dabee561a2be895473b8659f3f9a74 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sat, 14 Mar 2020 20:49:15 +0100 Subject: [PATCH] better naming --- src/matrix/room/room.js | 2 +- src/matrix/room/timeline/persistence/SyncWriter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/room.js b/src/matrix/room/room.js index 858ab149..d493bc00 100644 --- a/src/matrix/room/room.js +++ b/src/matrix/room/room.js @@ -31,12 +31,12 @@ export default class Room extends EventEmitter { } afterSync({summaryChanges, newTimelineEntries, newLiveKey, removedPendingEvents}) { + this._syncWriter.afterSync(newLiveKey); if (summaryChanges) { this._summary.afterSync(summaryChanges); this.emit("change"); this._emitCollectionChange(this); } - this._syncWriter.setKeyOnCompleted(newLiveKey); if (this._timeline) { this._timeline.appendLiveEntries(newTimelineEntries); } diff --git a/src/matrix/room/timeline/persistence/SyncWriter.js b/src/matrix/room/timeline/persistence/SyncWriter.js index 537a495f..be7d8f9b 100644 --- a/src/matrix/room/timeline/persistence/SyncWriter.js +++ b/src/matrix/room/timeline/persistence/SyncWriter.js @@ -129,7 +129,7 @@ export default class SyncWriter { return {entries, newLiveKey: currentKey}; } - setKeyOnCompleted(newLiveKey) { + afterSync(newLiveKey) { this._lastLiveKey = newLiveKey; } }