diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx index 3009bedae3..eccb68ed99 100644 --- a/src/components/structures/ThreadPanel.tsx +++ b/src/components/structures/ThreadPanel.tsx @@ -198,9 +198,10 @@ const ThreadPanel: React.FC = ({ useEffect(() => { const room = mxClient.getRoom(roomId); room.createThreadsTimelineSets().then(() => { - setRoom(room); + return room.fetchRoomThreads(); + }).then(() => { setFilterOption(ThreadFilterType.All); - room.fetchRoomThreads(); + setRoom(room); }); }, [mxClient, roomId]); @@ -286,8 +287,8 @@ const ThreadPanel: React.FC = ({ sensor={card.current} onMeasurement={setNarrow} /> - { timelineSet && ( - = ({ permalinkCreator={permalinkCreator} disableGrouping={true} /> - ) } + :
+ } ); diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index bc4ea5bdcb..7201e3c6f2 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -1188,11 +1188,8 @@ class TimelinePanel extends React.Component { const onLoaded = () => { if (this.unmounted) return; - // clear the timeline min-height when - // (re)loading the timeline - if (this.messagePanel.current) { - this.messagePanel.current.onTimelineReset(); - } + // clear the timeline min-height when (re)loading the timeline + this.messagePanel.current?.onTimelineReset(); this.reloadEvents(); // If we switched away from the room while there were pending