1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-05 15:22:09 +03:00

Fix main timeline pending events bleeding in thread's timeline (#7373)

This commit is contained in:
Germain
2021-12-15 12:40:56 +00:00
committed by GitHub
parent 1e09599447
commit 69c4a0cebc
4 changed files with 14 additions and 6 deletions

View File

@@ -1222,9 +1222,11 @@ class TimelinePanel extends React.Component<IProps, IState> {
// should use this list, so that they don't advance into pending events.
const liveEvents = [...events];
const thread = events[0]?.getThread();
// if we're at the end of the live timeline, append the pending events
if (!this.timelineWindow.canPaginate(EventTimeline.FORWARDS)) {
events.push(...this.props.timelineSet.getPendingEvents());
events.push(...this.props.timelineSet.getPendingEvents(thread));
}
return {