forked from mystiq/hydrogen-web
clear token on pagination when events start overlapping
This commit is contained in:
parent
0b637f656a
commit
7852f31f7e
1 changed files with 7 additions and 1 deletions
|
@ -64,14 +64,20 @@ export default class GapWriter {
|
||||||
if (neighbourFragmentEntry) {
|
if (neighbourFragmentEntry) {
|
||||||
fragmentEntry.linkedFragmentId = neighbourFragmentEntry.fragmentId;
|
fragmentEntry.linkedFragmentId = neighbourFragmentEntry.fragmentId;
|
||||||
neighbourFragmentEntry.linkedFragmentId = fragmentEntry.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);
|
txn.timelineFragments.update(neighbourFragmentEntry.fragment);
|
||||||
directionalAppend(entries, neighbourFragmentEntry, direction);
|
directionalAppend(entries, neighbourFragmentEntry, direction);
|
||||||
|
|
||||||
// update fragmentIdComparer here after linking up fragments
|
// update fragmentIdComparer here after linking up fragments
|
||||||
this._fragmentIdComparer.add(fragmentEntry.fragment);
|
this._fragmentIdComparer.add(fragmentEntry.fragment);
|
||||||
this._fragmentIdComparer.add(neighbourFragmentEntry.fragment);
|
this._fragmentIdComparer.add(neighbourFragmentEntry.fragment);
|
||||||
|
} else {
|
||||||
|
fragmentEntry.token = end;
|
||||||
}
|
}
|
||||||
fragmentEntry.token = end;
|
|
||||||
txn.timelineFragments.update(fragmentEntry.fragment);
|
txn.timelineFragments.update(fragmentEntry.fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue