Merge branch '1.92.1-ota-1' into 1.92.1-ota-2
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {
|
import {
|
||||||
KeyboardAwareScrollView,
|
KeyboardAwareScrollView,
|
||||||
|
useKeyboardController,
|
||||||
useKeyboardHandler,
|
useKeyboardHandler,
|
||||||
} from 'react-native-keyboard-controller'
|
} from 'react-native-keyboard-controller'
|
||||||
import {runOnJS} from 'react-native-reanimated'
|
import {runOnJS} from 'react-native-reanimated'
|
||||||
@@ -189,7 +190,21 @@ export const ScrollableInner = React.forwardRef<ScrollView, DialogInnerProps>(
|
|||||||
function ScrollableInner({children, style, ...props}, ref) {
|
function ScrollableInner({children, style, ...props}, ref) {
|
||||||
const {nativeSnapPoint, disableDrag, setDisableDrag} = useDialogContext()
|
const {nativeSnapPoint, disableDrag, setDisableDrag} = useDialogContext()
|
||||||
const insets = useSafeAreaInsets()
|
const insets = useSafeAreaInsets()
|
||||||
|
const {setEnabled} = useKeyboardController()
|
||||||
|
|
||||||
const [keyboardHeight, setKeyboardHeight] = React.useState(0)
|
const [keyboardHeight, setKeyboardHeight] = React.useState(0)
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (!isIOS) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setEnabled(true)
|
||||||
|
return () => {
|
||||||
|
setEnabled(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
useKeyboardHandler({
|
useKeyboardHandler({
|
||||||
onEnd: e => {
|
onEnd: e => {
|
||||||
'worklet'
|
'worklet'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, {useState} from 'react'
|
import React, {useState} from 'react'
|
||||||
import {Dimensions, TouchableOpacity, View} from 'react-native'
|
import {TouchableOpacity, View} from 'react-native'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
EmbedPlayerParams,
|
EmbedPlayerParams,
|
||||||
parseEmbedPlayerFromUrl,
|
parseEmbedPlayerFromUrl,
|
||||||
} from '#/lib/strings/embed-player'
|
} from '#/lib/strings/embed-player'
|
||||||
import {isAndroid, isWeb} from '#/platform/detection'
|
import {isAndroid} from '#/platform/detection'
|
||||||
import {useResolveGifQuery} from '#/state/queries/resolve-link'
|
import {useResolveGifQuery} from '#/state/queries/resolve-link'
|
||||||
import {Gif} from '#/state/queries/tenor'
|
import {Gif} from '#/state/queries/tenor'
|
||||||
import {AltTextCounterWrapper} from '#/view/com/composer/AltTextCounterWrapper'
|
import {AltTextCounterWrapper} from '#/view/com/composer/AltTextCounterWrapper'
|
||||||
@@ -107,8 +107,7 @@ export function GifAltTextDialogLoaded({
|
|||||||
control={control}
|
control={control}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
onSubmit(altTextDraft)
|
onSubmit(altTextDraft)
|
||||||
}}
|
}}>
|
||||||
nativeOptions={{minHeight: Dimensions.get('window').height}}>
|
|
||||||
<Dialog.Handle />
|
<Dialog.Handle />
|
||||||
<AltTextInner
|
<AltTextInner
|
||||||
vendorAltText={vendorAltText}
|
vendorAltText={vendorAltText}
|
||||||
@@ -158,7 +157,7 @@ function AltTextInner({
|
|||||||
defaultValue={altText}
|
defaultValue={altText}
|
||||||
multiline
|
multiline
|
||||||
numberOfLines={3}
|
numberOfLines={3}
|
||||||
autoFocus={isWeb}
|
autoFocus
|
||||||
onKeyPress={({nativeEvent}) => {
|
onKeyPress={({nativeEvent}) => {
|
||||||
if (nativeEvent.key === 'Escape') {
|
if (nativeEvent.key === 'Escape') {
|
||||||
control.close()
|
control.close()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {Dimensions, ImageStyle, useWindowDimensions, View} from 'react-native'
|
import {ImageStyle, useWindowDimensions, View} from 'react-native'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -38,8 +38,7 @@ export const ImageAltTextDialog = ({
|
|||||||
...image,
|
...image,
|
||||||
alt: enforceLen(altText, MAX_ALT_TEXT, true),
|
alt: enforceLen(altText, MAX_ALT_TEXT, true),
|
||||||
})
|
})
|
||||||
}}
|
}}>
|
||||||
nativeOptions={{minHeight: Dimensions.get('window').height}}>
|
|
||||||
<Dialog.Handle />
|
<Dialog.Handle />
|
||||||
<ImageAltTextInner
|
<ImageAltTextInner
|
||||||
control={control}
|
control={control}
|
||||||
@@ -123,7 +122,7 @@ const ImageAltTextInner = ({
|
|||||||
defaultValue={altText}
|
defaultValue={altText}
|
||||||
multiline
|
multiline
|
||||||
numberOfLines={3}
|
numberOfLines={3}
|
||||||
autoFocus={isWeb}
|
autoFocus
|
||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user