From 225380b24867631f3fd5e66d0a6aa53a8c5e3f1a Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Mon, 20 Sep 2021 12:53:08 +0100 Subject: [PATCH 1/2] Do not hide the root event of a thread --- src/components/structures/MessagePanel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 589947af73..74f281405c 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -448,7 +448,9 @@ export default class MessagePanel extends React.Component { // Always show highlighted event if (this.props.highlightedEventId === mxEv.getId()) return true; - if (mxEv.replyInThread + // Checking if the message has a "parentEventId" as we do not + // want to hide the root event of the thread + if (mxEv.replyInThread && mxEv.parentEventId && this.props.hideThreadedMessages && SettingsStore.getValue("feature_thread")) { return false; From 0a5e1772a52e9fecfec3444cd13a3c0d112a2efb Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Mon, 20 Sep 2021 12:55:57 +0100 Subject: [PATCH 2/2] hide thread info when there are 0 replies --- src/components/views/rooms/EventTile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 5d8c083390..671d925638 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -521,7 +521,7 @@ export default class EventTile extends React.Component { const thread = this.state.thread; const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); - if (!thread || this.props.showThreadInfo === false) { + if (!thread || this.props.showThreadInfo === false || thread.length <= 1) { return null; }