1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fixes after upgrades

This commit is contained in:
Zhiyuan Zheng
2022-05-08 23:40:42 +02:00
parent 1d6790c76e
commit d9e1530b8b
23 changed files with 67 additions and 63 deletions

View File

@ -2,7 +2,10 @@ import analytics from '@components/analytics'
import { ActionSheetOptions } from '@expo/react-native-action-sheet'
import * as ImageManipulator from 'expo-image-manipulator'
import * as ImagePicker from 'expo-image-picker'
import { ImageInfo } from 'expo-image-picker/build/ImagePicker.types'
import {
ImageInfo,
UIImagePickerPresentationStyle
} from 'expo-image-picker/build/ImagePicker.types'
import i18next from 'i18next'
import { Alert, Linking, Platform } from 'react-native'
@ -39,7 +42,7 @@ const mediaSelector = async ({
{ resize }
])
}
resolve(newResult)
resolve({ ...newResult, cancelled: false })
} else {
resolve(result)
}
@ -94,8 +97,8 @@ const mediaSelector = async ({
exif: false,
presentationStyle:
Platform.OS === 'ios' && parseInt(Platform.Version) < 13
? 0
: -2
? UIImagePickerPresentationStyle.FULL_SCREEN
: UIImagePickerPresentationStyle.AUTOMATIC
})
if (!result.cancelled) {