HomePhabricator
Diffusion Comm 8c77b3ae455b

[native] implement onPressSetAvatar function

Description

[native] implement onPressSetAvatar function

Summary:
Implement the onPressSetAvatar function. This diff handles the user experience for when a user presses the save avatar button.

Here's an outline of the experience from a high level:

  1. We attempt to call the update user avatar endpoint
  2. While we are making this attempt, both the save and reset button will be disabled and a spinner will render on top of the emoji avatar
  3. If we are successful we will show a toast message saying the avatar has been updated
  4. If we fail then an alert will display telling the user something went wrong and to try again later

Depends on D7403

Test Plan:
Please watch the demo video to see the changes I made

Success case:

Failed case:

Reviewers: ashoat, atul

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

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

Details

Provenance
ginsuAuthored on Apr 13 2023, 9:32 AM
Reviewer
ashoat
Differential Revision
D7359: [native] implement onPressSetAvatar function
Parents
rCOMMcaf80b74e363: [native] use savedEmojiAvatarSelectorForCurrentUser in EmojiAvatarCreation
Branches
Unknown
Tags
Unknown