Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Refresh ThreadView after React state has been updated #7539

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/structures/ThreadView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ export default class ThreadView extends React.Component<IProps, IState> {
if (thread && this.state.thread !== thread) {
this.setState({
thread,
}, () => {
thread.emit(ThreadEvent.ViewThread);
this.timelinePanelRef.current?.refreshTimeline();
});
thread.emit(ThreadEvent.ViewThread);
}

this.timelinePanelRef.current?.refreshTimeline();
};

private onScroll = (): void => {
Expand Down