mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
don't load timeline past gaps
This commit is contained in:
parent
1e4f331989
commit
56efd7eee0
@ -60,8 +60,8 @@ export class TimelineReader {
|
|||||||
let fragmentEntry = new FragmentBoundaryEntry(fragment, direction.isBackward, this._fragmentIdComparer);
|
let fragmentEntry = new FragmentBoundaryEntry(fragment, direction.isBackward, this._fragmentIdComparer);
|
||||||
// append or prepend fragmentEntry, reuse func from GapWriter?
|
// append or prepend fragmentEntry, reuse func from GapWriter?
|
||||||
directionalAppend(entries, fragmentEntry, direction);
|
directionalAppend(entries, fragmentEntry, direction);
|
||||||
// don't count it in amount perhaps? or do?
|
// only continue loading if the fragment boundary can't be backfilled
|
||||||
if (fragmentEntry.hasLinkedFragment) {
|
if (!fragmentEntry.token && fragmentEntry.hasLinkedFragment) {
|
||||||
const nextFragment = await fragmentStore.get(this._roomId, fragmentEntry.linkedFragmentId);
|
const nextFragment = await fragmentStore.get(this._roomId, fragmentEntry.linkedFragmentId);
|
||||||
this._fragmentIdComparer.add(nextFragment);
|
this._fragmentIdComparer.add(nextFragment);
|
||||||
const nextFragmentEntry = new FragmentBoundaryEntry(nextFragment, direction.isForward, this._fragmentIdComparer);
|
const nextFragmentEntry = new FragmentBoundaryEntry(nextFragment, direction.isForward, this._fragmentIdComparer);
|
||||||
|
Loading…
Reference in New Issue
Block a user