Run getReadAvatars() only when neccessary

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Š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
1 changed files with 1 additions and 2 deletions

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 }