HomePhabricator
Diffusion Comm 58b5465af053

[native] Construct synthetic UserInfo to pass to EditUserAvatar

Description

[native] Construct synthetic UserInfo to pass to EditUserAvatar

Summary:
EditUserAvatar renders an avatar via UserAvatar, which currently only works when the data (UserInfo or CurrentUserInfo) is in Redux.

For the registration flow, we want to render a "pending" avatar that hasn't been saved into Redux yet. To that end, this diff introduces a way to pass UserInfo to UserAvatar and EditUserAvatar.

Depends on D8045

Test Plan:
This was tested in combination with the rest of the stack. I tested:

  1. ENS flow, both when user has an ENS avatar and when they don't
  2. Setting an emoji avatar
  3. Setting an image avatar via camera
  4. Setting an image avatar via media library
  5. Tested avatar update flow after being logged in to make sure I didn't regress anything

To see the UI in action, check out the video in D8049!

Reviewers: ginsu, atul

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on May 31 2023, 10:10 AM
Reviewer
atul
Differential Revision
D8046: [native] Construct synthetic UserInfo to pass to EditUserAvatar
Parents
rCOMM33be0a69d6ae: [lib] Introduce new GenericUserInfoWithAvatar type
Branches
Unknown
Tags
Unknown