HomePhabricator
Diffusion Comm 2cd9dcd9e041

[native] extend avatar component to handle images

Description

[native] extend avatar component to handle images

Summary:
Extended avatar component to either render an emoji avatar or image avatar depending on avatarInfo.type.

Since Multimedia only uses type and uri from mediaInfo, I only included those fields in the AvatarMediaInfo type.

Depends on D7245

Test Plan:
To test if the image was rendering correctly, I injected the following as the avatarInfo:

const avatarInfo = { type: 'image', uri: 'https://picsum.photos/200' };

Please see the screenshots to see how the image avatar looks for each size:

Profile:

Screenshot 2023-03-27 at 8.40.30 AM.png (1×1 px, 685 KB)

Large:

Screenshot 2023-03-27 at 8.41.40 AM.png (1×1 px, 952 KB)

Small:

Screenshot 2023-03-27 at 8.43.33 AM.png (1×952 px, 570 KB)

Micro:

Screenshot 2023-03-27 at 8.44.27 AM.png (1×952 px, 613 KB)

Reviewers: ashoat, atul, bartek

Reviewed By: atul, bartek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7187

Details

Provenance
ginsuAuthored on Mar 30 2023, 10:24 AM
Reviewer
atul
Differential Revision
D7187: [native] extend avatar component to handle images
Parents
rCOMM8d55d986b329: [keyserver] Process and store encrypted media
Branches
Unknown
Tags
Unknown