Run getReadAvatars() only when neccessary
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -861,8 +861,6 @@ export default class EventTile extends React.Component {
|
|||||||
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
|
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
const readAvatars = this.getReadAvatars();
|
|
||||||
|
|
||||||
let avatar;
|
let avatar;
|
||||||
let sender;
|
let sender;
|
||||||
let avatarSize;
|
let avatarSize;
|
||||||
@@ -993,6 +991,7 @@ export default class EventTile extends React.Component {
|
|||||||
|
|
||||||
let msgOption;
|
let msgOption;
|
||||||
if (this.props.showReadReceipts) {
|
if (this.props.showReadReceipts) {
|
||||||
|
const readAvatars = this.getReadAvatars();
|
||||||
msgOption = (
|
msgOption = (
|
||||||
<div className="mx_EventTile_msgOption">
|
<div className="mx_EventTile_msgOption">
|
||||||
{ readAvatars }
|
{ readAvatars }
|
||||||
|
|||||||
Reference in New Issue
Block a user