Inline display name into return

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-06-11 15:14:16 +02:00
parent 8174973cfe
commit e260e8671f
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 3 additions and 7 deletions

View File

@ -118,12 +118,6 @@ export default class SenderProfile extends React.Component<IProps, IState> {
return null; // emote message must include the name so don't duplicate it
}
const displayNameElement = (
<span className={`mx_SenderProfile_displayName ${colorClass}`}>
{ displayName }
</span>
);
let mxidElement;
if (disambiguate) {
mxidElement = (
@ -147,7 +141,9 @@ export default class SenderProfile extends React.Component<IProps, IState> {
return (
<div className="mx_SenderProfile mx_SenderProfile_hover" dir="auto" onClick={this.props.onClick}>
{ displayNameElement }
<span className={`mx_SenderProfile_displayName ${colorClass}`}>
{ displayName }
</span>
{ mxidElement }
{ flair }
</div>