mirror of
https://github.com/tooot-app/app
synced 2025-03-13 10:00:07 +01:00
Fix iOS 12 crashes on media selection
https://github.com/expo/expo/issues/14903#issuecomment-966161497
This commit is contained in:
parent
ad0e55ffec
commit
545d4151aa
@ -4,7 +4,7 @@ import * as ImageManipulator from 'expo-image-manipulator'
|
||||
import * as ImagePicker from 'expo-image-picker'
|
||||
import { ImageInfo } from 'expo-image-picker/build/ImagePicker.types'
|
||||
import i18next from 'i18next'
|
||||
import { Alert, Linking } from 'react-native'
|
||||
import { Alert, Linking, Platform } from 'react-native'
|
||||
|
||||
export interface Props {
|
||||
mediaTypes?: ImagePicker.MediaTypeOptions
|
||||
@ -91,7 +91,11 @@ const mediaSelector = async ({
|
||||
} else {
|
||||
const result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes,
|
||||
exif: false
|
||||
exif: false,
|
||||
presentationStyle:
|
||||
Platform.OS === 'ios' && parseInt(Platform.Version) < 13
|
||||
? 0
|
||||
: -2
|
||||
})
|
||||
|
||||
if (!result.cancelled) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user