mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 19:26:04 +03:00
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.
This commit is contained in:
parent
d3c9792126
commit
341175ea58
1 changed files with 4 additions and 0 deletions
|
@ -265,7 +265,11 @@ var TimelinePanel = React.createClass({
|
|||
if (count > 0) {
|
||||
debuglog("TimelinePanel: Unpaginating", count, "in direction", dir);
|
||||
this._timelineWindow.unpaginate(count, backwards);
|
||||
|
||||
// We can now paginate in the unpaginated direction
|
||||
const canPaginateKey = (backwards) ? 'canBackPaginate' : 'canForwardPaginate';
|
||||
this.setState({
|
||||
[canPaginateKey]: true,
|
||||
events: this._getEvents(),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue