forked from mystiq/hydrogen-web
ctor takes a bool, not Direction. But use helper fn instead.
This commit is contained in:
parent
2a128ed32c
commit
35d90a8535
2 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ export default class FragmentBoundaryEntry extends BaseEntry {
|
||||||
constructor(fragment, isFragmentStart, fragmentIdComparator) {
|
constructor(fragment, isFragmentStart, fragmentIdComparator) {
|
||||||
super(fragmentIdComparator);
|
super(fragmentIdComparator);
|
||||||
this._fragment = fragment;
|
this._fragment = fragment;
|
||||||
|
// TODO: should isFragmentStart be Direction instead of bool?
|
||||||
this._isFragmentStart = isFragmentStart;
|
this._isFragmentStart = isFragmentStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default class TimelineReader {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
this._fragmentIdComparer.add(liveFragment);
|
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 eventKey = new EventKey(liveFragmentEntry.fragmentId, liveFragmentEntry.eventIndex);
|
||||||
const entries = this._readFrom(eventKey, Direction.Backward, amount, txn);
|
const entries = this._readFrom(eventKey, Direction.Backward, amount, txn);
|
||||||
entries.unshift(liveFragmentEntry);
|
entries.unshift(liveFragmentEntry);
|
||||||
|
|
Loading…
Reference in a new issue