add `legacy` to picker for Android (#4377)
* add `legacy` to picker * add for the other callsitezio/stable
parent
42477d8bbb
commit
492c271a06
|
@ -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) {
|
||||||
|
|
|
@ -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 ?? [])
|
||||||
|
|
Loading…
Reference in New Issue