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)
Wed, Jul 17, 12:13 AM
Unknown Object (File)
Tue, Jul 16, 5:57 AM
Unknown Object (File)
Tue, Jul 16, 5:57 AM
Unknown Object (File)
Tue, Jul 16, 5:57 AM
Unknown Object (File)
Tue, Jul 16, 5:55 AM
Unknown Object (File)
Fri, Jul 12, 6:31 AM
Unknown Object (File)
Fri, Jul 12, 1:40 AM
Unknown Object (File)
Wed, Jul 10, 2:52 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/avatars/avatar-hooks.js
11 ↗(On Diff #25291)

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 ↗(On Diff #25291)

Makes sense

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