HomePhabricator
Diffusion Comm 9081f2d40dba

[native] introduce useUploadSelectedMedia hook

Description

[native] introduce useUploadSelectedMedia hook

Summary: First step in the great avatars refactor/cleanup. Created this diff to factor out all the logic for uploading and preparing an image selection to be saved by the set avatar endpoints, which was really long and making it difficult to read/work in the avatar-hooks file.

Test Plan: Tested that I could still upload image avatar through this hook, and that the correct loading states for either user avatar or thread avatars were being changed during the image avatar creation flow

Reviewers: ashoat, atul

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

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

Details

Provenance
ginsuAuthored on Apr 21 2023, 11:57 AM
Reviewer
ashoat
Differential Revision
D7554: [native] introduce useUploadSelectedMedia hook
Parents
rCOMM70e7475bf23a: [identity] return user ID on login
Branches
Unknown
Tags
Unknown