Fix message load in Thread list (#7124)
parent
77c79467c6
commit
894ae6ab88
|
@ -1165,12 +1165,15 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
|| this.state.hover
|
|| this.state.hover
|
||||||
|| this.state.actionBarFocused);
|
|| this.state.actionBarFocused);
|
||||||
|
|
||||||
|
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
|
||||||
|
const thread = room.findThreadForEvent?.(this.props.mxEvent);
|
||||||
|
|
||||||
// Thread panel shows the timestamp of the last reply in that thread
|
// Thread panel shows the timestamp of the last reply in that thread
|
||||||
const ts = this.props.tileShape !== TileShape.ThreadPanel
|
const ts = this.props.tileShape !== TileShape.ThreadPanel
|
||||||
? this.props.mxEvent.getTs()
|
? this.props.mxEvent.getTs()
|
||||||
: this.props.mxEvent.getThread().lastReply.getTs();
|
: thread?.lastReply.getTs();
|
||||||
|
|
||||||
const timestamp = showTimestamp ?
|
const timestamp = showTimestamp && ts ?
|
||||||
<MessageTimestamp
|
<MessageTimestamp
|
||||||
showRelative={this.props.tileShape === TileShape.ThreadPanel}
|
showRelative={this.props.tileShape === TileShape.ThreadPanel}
|
||||||
showTwelveHour={this.props.isTwelveHour}
|
showTwelveHour={this.props.isTwelveHour}
|
||||||
|
|
Loading…
Reference in New Issue