Improved threads stability (#7639)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
e18bbb030d
commit
038f67e844
|
@ -485,8 +485,11 @@ export default class MessagePanel extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
// Checking if the message has a "parentEventId" as we do not
|
// Checking if the message has a "parentEventId" as we do not
|
||||||
// want to hide the root event of the thread
|
// want to hide the root event of the thread
|
||||||
if (mxEv.isThreadRelation && this.props.hideThreadedMessages
|
if (mxEv.isThreadRelation &&
|
||||||
&& SettingsStore.getValue("feature_thread")) {
|
!mxEv.isThreadRoot &&
|
||||||
|
this.props.hideThreadedMessages &&
|
||||||
|
SettingsStore.getValue("feature_thread")
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
||||||
};
|
};
|
||||||
|
|
||||||
private setupThread = (mxEv: MatrixEvent) => {
|
private setupThread = (mxEv: MatrixEvent) => {
|
||||||
let thread = this.props.room.threads.get(mxEv.getId());
|
let thread = this.props.room.threads?.get(mxEv.getId());
|
||||||
if (!thread) {
|
if (!thread) {
|
||||||
thread = this.props.room.createThread([mxEv]);
|
thread = this.props.room.createThread([mxEv]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,7 +383,8 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
constructor(props: IProps, context: React.ContextType<typeof MatrixClientContext>) {
|
constructor(props: IProps, context: React.ContextType<typeof MatrixClientContext>) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
const thread = this.props.mxEvent?.getThread();
|
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
|
||||||
|
const thread = room.threads?.get(this.props.mxEvent.getId());
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
// Whether the action bar is focused.
|
// Whether the action bar is focused.
|
||||||
|
|
Loading…
Reference in New Issue