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.
This commit is contained in:
Bruno Windels 2019-06-02 19:27:40 +02:00
parent bb5f139355
commit 0b637f656a

View File

@ -19,7 +19,7 @@ class Range {
if (this._lower && !this._upper) { if (this._lower && !this._upper) {
return IDBKeyRange.bound( return IDBKeyRange.bound(
[roomId, this._lower.fragmentId, this._lower.eventIndex], [roomId, this._lower.fragmentId, this._lower.eventIndex],
[roomId, EventKey.maxKey.fragmentId, EventKey.maxKey.eventIndex], [roomId, this._lower.fragmentId, EventKey.maxKey.eventIndex],
this._lowerOpen, this._lowerOpen,
false false
); );
@ -28,7 +28,7 @@ class Range {
// also bound as we don't want to move into another roomId // also bound as we don't want to move into another roomId
if (!this._lower && this._upper) { if (!this._lower && this._upper) {
return IDBKeyRange.bound( return IDBKeyRange.bound(
[roomId, EventKey.minKey.fragmentId, EventKey.minKey.eventIndex], [roomId, this._upper.fragmentId, EventKey.minKey.eventIndex],
[roomId, this._upper.fragmentId, this._upper.eventIndex], [roomId, this._upper.fragmentId, this._upper.eventIndex],
false, false,
this._upperOpen this._upperOpen