HomePhabricator
Diffusion Comm 13c5d23b5537

[native] Consume `useNativeUpdateUserImageAvatar` in…

Tags
None
Referenced Files
F609751: 8780c8.png
Jul 28 2023, 12:40 PM
File Not Attached
Subscribers
None

Description

[native] Consume useNativeUpdateUserImageAvatar in useSelectFromGalleryAndUpdateUserAvatar

Summary:
There is now only one usage of updateImageUserAvatar from *EditUserAvatarProvider and it's in useNativeUpdateUserImageAvatar where the call is wrapped in a try/catch with native-specific "error surfacing" handled in the catch block.


Depends on D8339

Test Plan:
selectFromGalleryAndUpdateUserAvatar is used in one place: EditUserAvatar. Specifically the select image from gallery flow.

Similar to D8339, will break update_user_avatar endpoint and ensure that alert surfaces as expected:

8780c8.png (282×584 px, 106 KB)

Will also test "happy case" where the update_user_avatar endpoint is working as expected.

Reviewers: ashoat, ginsu, rohan

Reviewed By: ashoat

Subscribers: tomek

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