From 894ae6ab88b10f67d36d52c429932ded667458ea Mon Sep 17 00:00:00 2001 From: Germain Date: Fri, 12 Nov 2021 12:44:03 +0000 Subject: [PATCH] Fix message load in Thread list (#7124) --- src/components/views/rooms/EventTile.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 9a163aebc1..dd181e7683 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1165,12 +1165,15 @@ export default class EventTile extends React.Component { || this.state.hover || 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 const ts = this.props.tileShape !== TileShape.ThreadPanel ? this.props.mxEvent.getTs() - : this.props.mxEvent.getThread().lastReply.getTs(); + : thread?.lastReply.getTs(); - const timestamp = showTimestamp ? + const timestamp = showTimestamp && ts ?