Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 341175e

Browse files
authored
Fix pagination issue where recent events are lost (#563)
Fix pagination issue where recent events are lost Scrolling up a few pages followed by scrolling down to the most recent events previously caused some events to go missing. A test has been modified in conjunction with this fix to make sure that this failure mode is tested for in future. This commit should fix the issue, and the most recent events should be paginated back in.
1 parent d3c9792 commit 341175e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/structures/TimelinePanel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ var TimelinePanel = React.createClass({
265265
if (count > 0) {
266266
debuglog("TimelinePanel: Unpaginating", count, "in direction", dir);
267267
this._timelineWindow.unpaginate(count, backwards);
268+
269+
// We can now paginate in the unpaginated direction
270+
const canPaginateKey = (backwards) ? 'canBackPaginate' : 'canForwardPaginate';
268271
this.setState({
272+
[canPaginateKey]: true,
269273
events: this._getEvents(),
270274
});
271275
}

0 commit comments

Comments
 (0)