[native] Introduce openPhotoGallery in EditAvatar component
Summary:
This was largely copy/pasted from @ginsu's work here: https://gist.github.com/ginsueddy/8f0dc9f2033e1a3c61282a060527814f
For now this callback just opens the native OS image picker and constructs MediaLibrarySelection.
The MediaLibrarySelection will then be passed to processMedia (which conveniently takes NativeMediaSelection (which is an alias for MediaLibrarySelection | etc) and MediaProcessConfig.
Subsequent diffs will handle
- Processing the selected media
- Uploading the selected media
- Constructing avatar update request with server uploadID
Test Plan:
Replace onPress for "Use Emoji" button with openPhotoGallery to ensure that media gallery launches and selection is constructed correctly.
Reviewers: ashoat, ginsu
Reviewed By: ashoat
Subscribers: tomek, ginsu
Differential Revision: https://phab.comm.dev/D7476