Squashed commit of the following:

commit af3560afebf5f4482e037c1f7c46ca16bd1975a2
Author: Zhiyuan Zheng <me@xmflsct.com>
Date:   Sun Feb 6 22:52:43 2022 +0100

    Hotfix v3.1.2

commit c8a16c9aa61de80b5e485cf09f5f539ab15b4449
Author: Zhiyuan Zheng <me@xmflsct.com>
Date:   Sun Feb 6 18:09:11 2022 +0100

    Try to fix weird crash

commit c9f7cb664c8ba34acd1700e8443bddb2bb039fcd
Author: Zhiyuan Zheng <me@xmflsct.com>
Date:   Sun Feb 6 22:47:30 2022 +0100

    Fix iOS 12 crashes on media selection

    https://github.com/expo/expo/issues/14903#issuecomment-966161497
This commit is contained in:
Zhiyuan Zheng 2022-02-06 22:53:00 +01:00
parent 10994988b2
commit f1e7e05a1d
3 changed files with 13 additions and 8 deletions

View File

@ -3,8 +3,8 @@
"versions": {
"native": "220204",
"major": 3,
"minor": 3,
"patch": 1,
"minor": 1,
"patch": 2,
"expo": "44.0.0"
},
"description": "tooot app for Mastodon",

View File

@ -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) {

View File

@ -169,10 +169,11 @@ const instancesSlice = createSlice({
action: PayloadAction<Instance['timelinesLookback']>
) => {
const activeIndex = findInstanceActive(instances)
instances[activeIndex].timelinesLookback = {
...instances[activeIndex].timelinesLookback,
...action.payload
}
instances[activeIndex] &&
(instances[activeIndex].timelinesLookback = {
...instances[activeIndex].timelinesLookback,
...action.payload
})
},
updateInstanceMePage: (
{ instances },