Run getReadAvatars() only when neccessary

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-04-14 12:25:48 +02:00
parent 43c236e8a5
commit a7b1c5dfe0
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -861,8 +861,6 @@ export default class EventTile extends React.Component {
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
}
const readAvatars = this.getReadAvatars();
let avatar;
let sender;
let avatarSize;
@ -993,6 +991,7 @@ export default class EventTile extends React.Component {
let msgOption;
if (this.props.showReadReceipts) {
const readAvatars = this.getReadAvatars();
msgOption = (
<div className="mx_EventTile_msgOption">
{ readAvatars }