Improved threads stability (#7639)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
e18bbb030d
commit
038f67e844
3 changed files with 8 additions and 4 deletions
|
@ -485,8 +485,11 @@ 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.isThreadRelation && this.props.hideThreadedMessages
|
||||
&& SettingsStore.getValue("feature_thread")) {
|
||||
if (mxEv.isThreadRelation &&
|
||||
!mxEv.isThreadRoot &&
|
||||
this.props.hideThreadedMessages &&
|
||||
SettingsStore.getValue("feature_thread")
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
|||
};
|
||||
|
||||
private setupThread = (mxEv: MatrixEvent) => {
|
||||
let thread = this.props.room.threads.get(mxEv.getId());
|
||||
let thread = this.props.room.threads?.get(mxEv.getId());
|
||||
if (!thread) {
|
||||
thread = this.props.room.createThread([mxEv]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue