mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
ctor takes a bool, not Direction. But use helper fn instead.
This commit is contained in:
parent
2a128ed32c
commit
35d90a8535
@ -5,6 +5,7 @@ export default class FragmentBoundaryEntry extends BaseEntry {
|
||||
constructor(fragment, isFragmentStart, fragmentIdComparator) {
|
||||
super(fragmentIdComparator);
|
||||
this._fragment = fragment;
|
||||
// TODO: should isFragmentStart be Direction instead of bool?
|
||||
this._isFragmentStart = isFragmentStart;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ export default class TimelineReader {
|
||||
return [];
|
||||
}
|
||||
this._fragmentIdComparer.add(liveFragment);
|
||||
const liveFragmentEntry = new FragmentBoundaryEntry(liveFragment, Direction.Forward, this._fragmentIdComparer);
|
||||
const liveFragmentEntry = FragmentBoundaryEntry.end(liveFragment, this._fragmentIdComparer);
|
||||
const eventKey = new EventKey(liveFragmentEntry.fragmentId, liveFragmentEntry.eventIndex);
|
||||
const entries = this._readFrom(eventKey, Direction.Backward, amount, txn);
|
||||
entries.unshift(liveFragmentEntry);
|
||||
|
Loading…
Reference in New Issue
Block a user