Update lastReply to filter out local event ID from thread fallback (#7620)

This commit is contained in:
Germain 2022-01-25 10:51:17 +00:00 committed by GitHub
parent 1d02e61655
commit ecd5be8a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View file

@ -402,7 +402,7 @@ export default class EventTile extends React.Component<IProps, IState> {
thread,
threadReplyCount: thread?.length,
threadLastReply: thread?.lastReply,
threadLastReply: thread?.lastReply(),
};
// don't do RR animations until we are mounted
@ -556,7 +556,7 @@ export default class EventTile extends React.Component<IProps, IState> {
}
this.setState({
threadLastReply: thread?.lastReply,
threadLastReply: thread?.lastReply(),
threadReplyCount: thread?.length,
thread,
});
@ -1271,7 +1271,7 @@ export default class EventTile extends React.Component<IProps, IState> {
// Thread panel shows the timestamp of the last reply in that thread
const ts = this.props.tileShape !== TileShape.ThreadPanel
? this.props.mxEvent.getTs()
: thread?.lastReply.getTs();
: thread?.lastReply().getTs();
const timestamp = showTimestamp && ts ?
<MessageTimestamp