Fix main timeline pending events bleeding in thread's timeline (#7373)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -513,7 +513,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||
const room = this.context.getRoom(this.props.mxEvent.getRoomId());
|
||||
const notifications = RoomNotificationStateStore.instance.getThreadsRoomState(room);
|
||||
|
||||
this.threadState = notifications.threadsState.get(thread);
|
||||
this.threadState = notifications.getThreadRoomState(thread);
|
||||
|
||||
this.threadState.on(NotificationStateEvents.Update, this.onThreadStateUpdate);
|
||||
this.onThreadStateUpdate();
|
||||
|
||||
Reference in New Issue
Block a user