Page MenuHomePhabricator

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

Authored by atul on Apr 18 2023, 10:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 2:10 AM
Unknown Object (File)
Mon, Oct 28, 1:56 PM
Unknown Object (File)
Tue, Oct 22, 9:12 PM
Unknown Object (File)
Oct 3 2024, 2:56 AM
Unknown Object (File)
Oct 3 2024, 2:56 AM
Unknown Object (File)
Oct 3 2024, 2:56 AM
Unknown Object (File)
Oct 3 2024, 2:51 AM
Unknown Object (File)
Sep 18 2024, 2:52 PM
Subscribers

Details

Summary

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

Test Plan
  1. Replace onPressEmojiAvatarFlow with openPhotoGallery in Edit[User/Thread]Avatar
  2. Ensure that selected image appears in keyserver uploads table as before.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/avatars/avatar-hooks.js
11

Placing this in native/avatars/avatar-hooks for now because openPhotoGallery has some native-specific code.

It is true that useUploadProcessedMedia and useProcessSelectedMedia (next diff) could also be useful for web and so it might make sense for them to live in lib... but I think we can defer that for later. Right now it's convenient to have them all in one file, and because of openPhotoGallery it makes sense for that one file to be within native.

atul requested review of this revision.Apr 18 2023, 11:01 AM
atul retitled this revision from [native] Pull `useUploadProcessedMedia` out of `[User/Thread]Avatar` to [native] Pull `useUploadProcessedMedia` out of `Edit[User/Thread]Avatar`.Apr 18 2023, 12:28 PM
atul edited the summary of this revision. (Show Details)
ashoat added inline comments.
native/avatars/avatar-hooks.js
11

Makes sense

This revision is now accepted and ready to land.Apr 18 2023, 1:11 PM