HomePhabricator
Diffusion Comm bc730e3dd48e

[native] introude thread avatar component

Description

[native] introude thread avatar component

Summary:
After some discussion with @ashoat and @atul about how to fetch the ens avatars we decided to have two separate components to render avatars: UserAvatar and ThreadAvatar. This diff handles ThreadAvatar.

Generally, a thread avatar should not be able an ENS avatar since we won't be able to set it for threads; however, if the thread type is either PRIVATE or PERSONAL then if the user avatar type is ens then we need to render the ens user avatar

Depends on D7260

Test Plan:
I was able to render all three avatar types: Emoji, Image, and ENS:

Emoji:

Screenshot 2023-03-30 at 5.11.49 PM.png (1×1 px, 939 KB)

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

Screenshot 2023-03-30 at 5.07.25 PM.png (1×1 px, 947 KB)

ENS by hardcoding const avatarInfo = { type: 'ens' } and the other values like the provider and ethAddress from this gist

Screenshot 2023-03-30 at 5.06.21 PM.png (1×1 px, 932 KB)

Reviewers: atul, ashoat

Reviewed By: ashoat

Subscribers: tomek, ashoat, atul

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

Details

Provenance
ginsuAuthored on Mar 31 2023, 9:03 AM
Reviewer
ashoat
Differential Revision
D7262: [native] introude thread avatar component
Parents
rCOMMf87c4b812240: [native/lib] introduce useENSResolvedAvatar hook in avatar-utils
Branches
Unknown
Tags
Unknown