Fix blurred avatars in message details

This commit is contained in:
Evan Hahn 2021-05-04 18:19:36 -05:00 committed by GitHub
parent c5c667ab1b
commit 7c2f233384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ import { assert } from '../../util/assert';
export type Contact = { export type Contact = {
status: MessageStatusType | null; status: MessageStatusType | null;
acceptedMessageRequest?: boolean;
title: string; title: string;
phoneNumber?: string; phoneNumber?: string;
name?: string; name?: string;
@ -28,7 +29,9 @@ export type Contact = {
avatarPath?: string; avatarPath?: string;
color?: ColorType; color?: ColorType;
isOutgoingKeyError: boolean; isOutgoingKeyError: boolean;
sharedGroupNames?: Array<string>;
isUnidentifiedDelivery: boolean; isUnidentifiedDelivery: boolean;
unblurredAvatarPath?: string;
errors?: Array<Error>; errors?: Array<Error>;
@ -89,16 +92,20 @@ export class MessageDetail extends React.Component<Props> {
public renderAvatar(contact: Contact): JSX.Element { public renderAvatar(contact: Contact): JSX.Element {
const { i18n } = this.props; const { i18n } = this.props;
const { const {
acceptedMessageRequest,
avatarPath, avatarPath,
color, color,
phoneNumber,
name, name,
phoneNumber,
profileName, profileName,
sharedGroupNames,
title, title,
unblurredAvatarPath,
} = contact; } = contact;
return ( return (
<Avatar <Avatar
acceptedMessageRequest={acceptedMessageRequest}
avatarPath={avatarPath} avatarPath={avatarPath}
color={color} color={color}
conversationType="direct" conversationType="direct"
@ -107,7 +114,9 @@ export class MessageDetail extends React.Component<Props> {
phoneNumber={phoneNumber} phoneNumber={phoneNumber}
profileName={profileName} profileName={profileName}
title={title} title={title}
sharedGroupNames={sharedGroupNames}
size={52} size={52}
unblurredAvatarPath={unblurredAvatarPath}
/> />
); );
} }