You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-16 22:01:54 +03:00
Fix infinite loop when there are a lot of invisible events (#554)
Instead of using a window of a fixed number of events, unpaginate based on the distance of the viewport from the end of the scroll range. The ScrollPanel uses the scrollTokens to convey to its parent (the TimelinePanel, in this case) the point to unpaginate up to. The TimelinePanel then takes a chunk of events off the front or back of `this.state.events` using `timelineWindow.unpaginate`. Fixes https://github.com/vector-im/vector-web/issues/2020
This commit is contained in:
committed by
Richard van der Hoff
parent
6ccc825f0d
commit
b718f1542c
@ -321,8 +321,11 @@ module.exports = React.createClass({
|
||||
}
|
||||
|
||||
ret.push(
|
||||
<MemberEventListSummary key={mxEv.getId()} events={summarisedEvents}>
|
||||
{eventTiles}
|
||||
<MemberEventListSummary
|
||||
key={mxEv.getId()}
|
||||
events={summarisedEvents}
|
||||
data-scroll-token={eventId}>
|
||||
{eventTiles}
|
||||
</MemberEventListSummary>
|
||||
);
|
||||
continue;
|
||||
@ -564,6 +567,7 @@ module.exports = React.createClass({
|
||||
onScroll={ this.props.onScroll }
|
||||
onResize={ this.onResize }
|
||||
onFillRequest={ this.props.onFillRequest }
|
||||
onUnfillRequest={ this.props.onUnfillRequest }
|
||||
style={ style }
|
||||
stickyBottom={ this.props.stickyBottom }>
|
||||
{topSpinner}
|
||||
|
Reference in New Issue
Block a user