Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix EventTile avatars being rendered with a size of 0 instead of hidd…
Browse files Browse the repository at this point in the history
…en (#11558)

(cherry picked from commit c825e34)
  • Loading branch information
t3chguy authored and github-actions[bot] committed Sep 6, 2023
1 parent 87272fc commit 4e44407
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>

let avatar: JSX.Element | null = null;
let sender: JSX.Element | null = null;
let avatarSize: string;
let avatarSize: string | null;
let needsSenderProfile: boolean;

if (isRenderingNotification) {
Expand All @@ -1021,7 +1021,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
avatarSize = "32px";
needsSenderProfile = true;
} else if (eventType === EventType.RoomCreate || isBubbleMessage) {
avatarSize = "0";
avatarSize = null;
needsSenderProfile = false;
} else if (this.props.layout == Layout.IRC) {
avatarSize = "14px";
Expand All @@ -1032,14 +1032,14 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
ElementCall.CALL_EVENT_TYPE.matches(eventType)
) {
// no avatar or sender profile for continuation messages and call tiles
avatarSize = "0";
avatarSize = null;
needsSenderProfile = false;
} else {
avatarSize = "30px";
needsSenderProfile = true;
}

if (this.props.mxEvent.sender && avatarSize) {
if (this.props.mxEvent.sender && avatarSize !== null) {
let member: RoomMember | null = null;
// set member to receiver (target) if it is a 3PID invite
// so that the correct avatar is shown as the text is
Expand Down

0 comments on commit 4e44407

Please sign in to comment.