From 0b637f656ac39dc5995f43c45b1b6d71c828f6c3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sun, 2 Jun 2019 19:27:40 +0200 Subject: [PATCH] timeline store requests should always be scoped to 1 fragmentId as fragmentIds should not be sorted, they are a linked list and that is what determines their order. --- src/matrix/storage/idb/stores/TimelineEventStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/storage/idb/stores/TimelineEventStore.js b/src/matrix/storage/idb/stores/TimelineEventStore.js index a6ce5617..fc7a07ca 100644 --- a/src/matrix/storage/idb/stores/TimelineEventStore.js +++ b/src/matrix/storage/idb/stores/TimelineEventStore.js @@ -19,7 +19,7 @@ class Range { if (this._lower && !this._upper) { return IDBKeyRange.bound( [roomId, this._lower.fragmentId, this._lower.eventIndex], - [roomId, EventKey.maxKey.fragmentId, EventKey.maxKey.eventIndex], + [roomId, this._lower.fragmentId, EventKey.maxKey.eventIndex], this._lowerOpen, false ); @@ -28,7 +28,7 @@ class Range { // also bound as we don't want to move into another roomId if (!this._lower && this._upper) { return IDBKeyRange.bound( - [roomId, EventKey.minKey.fragmentId, EventKey.minKey.eventIndex], + [roomId, this._upper.fragmentId, EventKey.minKey.eventIndex], [roomId, this._upper.fragmentId, this._upper.eventIndex], false, this._upperOpen