HomePhabricator
Diffusion Comm 61f134825fab

[native] Pull `useProcessSelectedMedia` out of `Edit[User/Thread]Avatar`

Description

[native] Pull useProcessSelectedMedia out of Edit[User/Thread]Avatar

Summary:
Pull out common functionality from Edit[User/Thread]Avatar and move to newly introduced avatar-hooks.js.


Depends on D7493

Test Plan:

  1. Replace onPressEmojiAvatarFlow with openPhotoGallery in Edit[User/Thread]Avatar
  2. Ensure that selection is processed correctly (logging + breakpoint)
  3. Ensure that selected image appears in keyserver uploads table as before

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

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

Details