add legacy to picker for Android (#4377)
* add `legacy` to picker * add for the other callsite
This commit is contained in:
@@ -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 ?? [])
|
||||||
|
|||||||
Reference in New Issue
Block a user