HomePhabricator
Diffusion Comm 4cda52ed4e81

[native] Add function to open native picker

Description

[native] Add function to open native picker

Summary:
Created a function that opens the native image picker interface using the expo-image-picker library and then processes the result to be compatible with our MediaLibrarySelection type. Finally, it updates the component state to make the selection prepended to the MediaGalleryKeyboard and queued to send.

Useful docs: image picker options, returned data.

Depends on D6493, D6494

Test Plan:
Created a test button that triggers this function and ensured (both platforms) that:

  • native picker opens
  • multiple results can be picked
  • selected media are prepended to the gallery and enqueued to send

Reviewers: ashoat, atul, inka, kamil

Reviewed By: ashoat, atul

Subscribers: tomek

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

Details

Provenance
bartekAuthored on Feb 1 2023, 8:28 AM
Reviewer
ashoat
Differential Revision
D6495: [native] Add function to open native picker
Parents
rCOMM382baa4e984b: [native] Allow MediaGallery items to mount pre-selected
Branches
Unknown
Tags
Unknown