mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
clear token on pagination when events start overlapping
This commit is contained in:
parent
0b637f656a
commit
7852f31f7e
@ -64,14 +64,20 @@ export default class GapWriter {
|
||||
if (neighbourFragmentEntry) {
|
||||
fragmentEntry.linkedFragmentId = neighbourFragmentEntry.fragmentId;
|
||||
neighbourFragmentEntry.linkedFragmentId = fragmentEntry.fragmentId;
|
||||
// if neighbourFragmentEntry was found, it means the events were overlapping,
|
||||
// so no pagination should happen anymore.
|
||||
neighbourFragmentEntry.token = null;
|
||||
fragmentEntry.token = null;
|
||||
|
||||
txn.timelineFragments.update(neighbourFragmentEntry.fragment);
|
||||
directionalAppend(entries, neighbourFragmentEntry, direction);
|
||||
|
||||
// update fragmentIdComparer here after linking up fragments
|
||||
this._fragmentIdComparer.add(fragmentEntry.fragment);
|
||||
this._fragmentIdComparer.add(neighbourFragmentEntry.fragment);
|
||||
} else {
|
||||
fragmentEntry.token = end;
|
||||
}
|
||||
fragmentEntry.token = end;
|
||||
txn.timelineFragments.update(fragmentEntry.fragment);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user