Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/components/structures/MessagePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {

// Checking if the message has a "parentEventId" as we do not
// want to hide the root event of the thread
if (mxEv.isThreadRoot && this.props.hideThreadedMessages
if (mxEv.isThreadRelation && this.props.hideThreadedMessages
&& SettingsStore.getValue("feature_thread")) {
return false;
}
Expand Down
7 changes: 6 additions & 1 deletion src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,13 @@ export default class EventTile extends React.Component<IProps, IState> {
return null;
}

const thread = this.state.thread;
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
const thread = room.threads.get(this.props.mxEvent.getId());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a comment on why this.state.thread isn't the right thing here?


if (thread && !thread.ready) {
thread.addEvent(this.props.mxEvent, true);
}

if (!thread || this.props.showThreadInfo === false || thread.length <= 1) {
return null;
}
Expand Down