disable avoiding view when e2e
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
LayoutChangeEvent,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleProp,
|
||||
StyleSheet,
|
||||
@@ -263,8 +264,7 @@ export const ComposePost = ({
|
||||
const viewStyles = useMemo(
|
||||
() => ({
|
||||
paddingTop: isAndroid ? insets.top : 0,
|
||||
paddingBottom:
|
||||
isAndroid || (isIOS && !isKeyboardVisible) ? insets.bottom : 0,
|
||||
paddingBottom: isNative && !isKeyboardVisible ? insets.bottom : 0,
|
||||
}),
|
||||
[insets, isKeyboardVisible],
|
||||
)
|
||||
@@ -610,6 +610,14 @@ export const ComposePost = ({
|
||||
testID="composePostView"
|
||||
behavior={isIOS ? 'padding' : 'height'}
|
||||
keyboardVerticalOffset={keyboardVerticalOffset}
|
||||
// disable when android edge-to-edge
|
||||
enabled={
|
||||
!(
|
||||
Platform.OS === 'android' &&
|
||||
Platform.Version >= 35 &&
|
||||
!isKeyboardVisible
|
||||
)
|
||||
}
|
||||
style={a.flex_1}>
|
||||
<View
|
||||
style={[a.flex_1, viewStyles]}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {useEffect} from 'react'
|
||||
import {Animated, Easing, StyleSheet, View} from 'react-native'
|
||||
import {Animated, Easing, View} from 'react-native'
|
||||
|
||||
import {useAnimatedValue} from '#/lib/hooks/useAnimatedValue'
|
||||
import {usePalette} from '#/lib/hooks/usePalette'
|
||||
import {useComposerState} from '#/state/shell/composer'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {ComposePost} from '../com/composer/Composer'
|
||||
|
||||
export function Composer({winHeight}: {winHeight: number}) {
|
||||
const state = useComposerState()
|
||||
const pal = usePalette('default')
|
||||
const t = useTheme()
|
||||
const initInterp = useAnimatedValue(0)
|
||||
|
||||
useEffect(() => {
|
||||
@@ -43,7 +43,7 @@ export function Composer({winHeight}: {winHeight: number}) {
|
||||
|
||||
return (
|
||||
<Animated.View
|
||||
style={[styles.wrapper, pal.view, wrapperAnimStyle]}
|
||||
style={[a.absolute, a.inset_0, t.atoms.bg, wrapperAnimStyle]}
|
||||
aria-modal
|
||||
accessibilityViewIsModal>
|
||||
<ComposePost
|
||||
@@ -58,12 +58,3 @@ export function Composer({winHeight}: {winHeight: number}) {
|
||||
</Animated.View>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
wrapper: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
width: '100%',
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user