Clarify and simplfiy unpagination logic
This commit is contained in:
parent
94fe9999db
commit
5737994957
2 changed files with 20 additions and 24 deletions
|
@ -251,10 +251,12 @@ var TimelinePanel = React.createClass({
|
|||
},
|
||||
|
||||
onMessageListUnfillRequest: function(backwards, scrollToken) {
|
||||
// If backwards, unpaginate from the back
|
||||
let dir = backwards ? EventTimeline.BACKWARDS : EventTimeline.FORWARDS;
|
||||
debuglog("TimelinePanel: unpaginating events in direction", dir);
|
||||
|
||||
// All tiles are inserted by MessagePanel to have a scrollToken === eventId
|
||||
// All tiles are inserted by MessagePanel to have a scrollToken === eventId, and
|
||||
// this particular event should be the first or last to be unpaginated.
|
||||
let eventId = scrollToken;
|
||||
|
||||
let marker = this.state.events.findIndex(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue