forked from mystiq/hydrogen-web
it's entry.entryIndex, not eventIndex, but use helper method instead.
This commit is contained in:
parent
674007d892
commit
d022608a1a
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
||||||
import { SortedArray } from "../../../observable/index.js";
|
import { SortedArray } from "../../../observable/index.js";
|
||||||
import EventKey from "./EventKey.js";
|
|
||||||
import Direction from "./Direction.js";
|
import Direction from "./Direction.js";
|
||||||
import GapWriter from "./persistence/GapWriter.js";
|
import GapWriter from "./persistence/GapWriter.js";
|
||||||
import TimelineReader from "./persistence/TimelineReader.js";
|
import TimelineReader from "./persistence/TimelineReader.js";
|
||||||
|
@ -52,8 +51,11 @@ export default class Timeline {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const firstEntry = this._entriesList.array()[0];
|
const firstEntry = this._entriesList.array()[0];
|
||||||
const firstKey = new EventKey(firstEntry.fragmentId, firstEntry.eventIndex);
|
const entries = await this._timelineReader.readFrom(
|
||||||
const entries = await this._timelineReader.readFrom(firstKey, Direction.Backward, amount);
|
firstEntry.asEventKey(),
|
||||||
|
Direction.Backward,
|
||||||
|
amount
|
||||||
|
);
|
||||||
this._entriesList.setManySorted(entries);
|
this._entriesList.setManySorted(entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue