add `legacy` to picker for Android (#4377)

* add `legacy` to picker

* add for the other callsite
zio/stable
Hailey 2024-06-05 16:27:57 -07:00 committed by GitHub
parent 42477d8bbb
commit 492c271a06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -3,8 +3,9 @@ import {
launchImageLibraryAsync, launchImageLibraryAsync,
MediaTypeOptions, MediaTypeOptions,
} from 'expo-image-picker' } from 'expo-image-picker'
import {getDataUriSize} from './util'
import * as Toast from 'view/com/util/Toast' import * as Toast from 'view/com/util/Toast'
import {getDataUriSize} from './util'
export async function openPicker(opts?: ImagePickerOptions) { export async function openPicker(opts?: ImagePickerOptions) {
const response = await launchImageLibraryAsync({ const response = await launchImageLibraryAsync({
@ -12,6 +13,7 @@ export async function openPicker(opts?: ImagePickerOptions) {
mediaTypes: MediaTypeOptions.Images, mediaTypes: MediaTypeOptions.Images,
quality: 1, quality: 1,
...opts, ...opts,
legacy: true,
}) })
if (response.assets && response.assets.length > 4) { if (response.assets && response.assets.length > 4) {

View File

@ -102,6 +102,7 @@ export function StepProfile() {
mediaTypes: MediaTypeOptions.Images, mediaTypes: MediaTypeOptions.Images,
quality: 1, quality: 1,
...opts, ...opts,
legacy: true,
}) })
return (response.assets ?? []) return (response.assets ?? [])