HomePhabricator
Diffusion Comm d21240a7692b

[native] Update `useRemoveUserAvatar` to return `isLoading`

Description

[native] Update useRemoveUserAvatar to return isLoading

Summary:
We modify useRemoveUserAvatar to return a tuple of useRemoveUserAvatar, isLoading.

In subsequent diff will consume this along w/ isLoading from useSelectFromGalleryAndUpdateUserAvatar` to render a spinner over the image when operation is in progress.

For convenience, I'm going to have a multiple diffs where I update the EditUserAvatar flow, and then a single diff where I update the EditThreadAvatar flow to match. There's a lot of repetition, but I have ideas on how to consolidate things once we have a shippable experience.


Depends on D7527

Test Plan:
Consume inProgress in EditUserAvatar and log the value. The value being printed matched up with the progress of the flow.

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

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

Details

Provenance
atulAuthored on Apr 19 2023, 11:25 AM
Reviewer
ashoat
Differential Revision
D7528: [native] Update `useRemoveUserAvatar` to return `isLoading`
Parents
rCOMM4d3ff6bec4bb: [native] Update `useSelectFromGalleryAndUpdateUserAvatar` to return `isLoading`
Branches
Unknown
Tags
Unknown