Files
archived-orca/mobile/src/platform/media-picker.ts
Neil 19043a3d76 refactor(mobile): organize pairing, session, RPC and host owners (#39846)
* refactor(mobile): give relay and encryption concrete owners

* refactor(mobile): organize session and review feature owners

* refactor(mobile): organize RPC and host ownership

* test(mobile): point render fixtures at concrete owners

* refactor(mobile): use explicit type-only owner imports
2026-11-08 07:19:05 -08:00

16 lines
667 B
TypeScript

import { pickMobileImage, pickMobileImages } from '../files/attachments/mobile-image-source-picker'
import { pickMobileFiles } from '../files/attachments/mobile-file-source-picker'
import type { MediaPicker } from './media-picker-contract'
// Keep Expo picker imports in the native sibling: their codegen lookup throws in browsers.
const devicePicker: MediaPicker = {
pickImage: (source) => pickMobileImage(source),
pickImages: (source) => pickMobileImages(source),
pickFiles: () => pickMobileFiles()
}
export function useMediaPicker(): MediaPicker {
// Reuse module functions so dependency lists do not restart effects each render.
return devicePicker
}