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

Commit 240cb10

Browse files
author
Germain
authored
Refresh ThreadView after React state has been updated (#7539)
1 parent de28d82 commit 240cb10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/structures/ThreadView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ export default class ThreadView extends React.Component<IProps, IState> {
165165
if (thread && this.state.thread !== thread) {
166166
this.setState({
167167
thread,
168+
}, () => {
169+
thread.emit(ThreadEvent.ViewThread);
170+
this.timelinePanelRef.current?.refreshTimeline();
168171
});
169-
thread.emit(ThreadEvent.ViewThread);
170172
}
171-
172-
this.timelinePanelRef.current?.refreshTimeline();
173173
};
174174

175175
private onScroll = (): void => {

0 commit comments

Comments
 (0)