mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
it's entry.entryIndex, not eventIndex, but use helper method instead.
This commit is contained in:
parent
674007d892
commit
d022608a1a
@ -1,5 +1,4 @@
|
||||
import { SortedArray } from "../../../observable/index.js";
|
||||
import EventKey from "./EventKey.js";
|
||||
import Direction from "./Direction.js";
|
||||
import GapWriter from "./persistence/GapWriter.js";
|
||||
import TimelineReader from "./persistence/TimelineReader.js";
|
||||
@ -52,8 +51,11 @@ export default class Timeline {
|
||||
return;
|
||||
}
|
||||
const firstEntry = this._entriesList.array()[0];
|
||||
const firstKey = new EventKey(firstEntry.fragmentId, firstEntry.eventIndex);
|
||||
const entries = await this._timelineReader.readFrom(firstKey, Direction.Backward, amount);
|
||||
const entries = await this._timelineReader.readFrom(
|
||||
firstEntry.asEventKey(),
|
||||
Direction.Backward,
|
||||
amount
|
||||
);
|
||||
this._entriesList.setManySorted(entries);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user