mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 12:58:53 +03:00
Fix EventTile avatars being rendered with a size of 0 instead of hidden (#11558)
This commit is contained in:
parent
f4dc264508
commit
c825e34f16
1 changed files with 4 additions and 4 deletions
|
@ -1003,7 +1003,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
||||||
|
|
||||||
let avatar: JSX.Element | null = null;
|
let avatar: JSX.Element | null = null;
|
||||||
let sender: JSX.Element | null = null;
|
let sender: JSX.Element | null = null;
|
||||||
let avatarSize: string;
|
let avatarSize: string | null;
|
||||||
let needsSenderProfile: boolean;
|
let needsSenderProfile: boolean;
|
||||||
|
|
||||||
if (isRenderingNotification) {
|
if (isRenderingNotification) {
|
||||||
|
@ -1021,7 +1021,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
||||||
avatarSize = "32px";
|
avatarSize = "32px";
|
||||||
needsSenderProfile = true;
|
needsSenderProfile = true;
|
||||||
} else if (eventType === EventType.RoomCreate || isBubbleMessage) {
|
} else if (eventType === EventType.RoomCreate || isBubbleMessage) {
|
||||||
avatarSize = "0";
|
avatarSize = null;
|
||||||
needsSenderProfile = false;
|
needsSenderProfile = false;
|
||||||
} else if (this.props.layout == Layout.IRC) {
|
} else if (this.props.layout == Layout.IRC) {
|
||||||
avatarSize = "14px";
|
avatarSize = "14px";
|
||||||
|
@ -1032,14 +1032,14 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
||||||
ElementCall.CALL_EVENT_TYPE.matches(eventType)
|
ElementCall.CALL_EVENT_TYPE.matches(eventType)
|
||||||
) {
|
) {
|
||||||
// no avatar or sender profile for continuation messages and call tiles
|
// no avatar or sender profile for continuation messages and call tiles
|
||||||
avatarSize = "0";
|
avatarSize = null;
|
||||||
needsSenderProfile = false;
|
needsSenderProfile = false;
|
||||||
} else {
|
} else {
|
||||||
avatarSize = "30px";
|
avatarSize = "30px";
|
||||||
needsSenderProfile = true;
|
needsSenderProfile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.mxEvent.sender && avatarSize) {
|
if (this.props.mxEvent.sender && avatarSize !== null) {
|
||||||
let member: RoomMember | null = null;
|
let member: RoomMember | null = null;
|
||||||
// set member to receiver (target) if it is a 3PID invite
|
// set member to receiver (target) if it is a 3PID invite
|
||||||
// so that the correct avatar is shown as the text is
|
// so that the correct avatar is shown as the text is
|
||||||
|
|
Loading…
Reference in a new issue