HomePhabricator
Diffusion Comm 408cea282dc6

[native] Introduce avatarData state to hold pending avatar in AvatarSelection

Description

[native] Introduce avatarData state to hold pending avatar in AvatarSelection

Summary:
This diff "introduces" this state (it was previously introduced, but was never updated), and adds code for updating it.

We now see updates of the avatar in AvatarSelection reflected in the UserAvatar rendered by EditUserAvatar.

Depends on D8047

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

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: tomek

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