Fix Android composer padding: Director's Cut (#7412)

* fix android 15 composer padding

* while I'm here, alf some bits and pieces

* add comments
This commit is contained in:
Samuel Newman
2025-01-09 18:06:24 +00:00
committed by GitHub
parent e5c587450f
commit 3b9a51c43f
3 changed files with 21 additions and 22 deletions
+5 -14
View File
@@ -1,14 +1,14 @@
import {useEffect} from 'react'
import {Animated, Easing, StyleSheet, View} from 'react-native'
import {Animated, Easing} 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(() => {
@@ -38,12 +38,12 @@ export function Composer({winHeight}: {winHeight: number}) {
// =
if (!state) {
return <View />
return null
}
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%',
},
})
+1 -1
View File
@@ -25,7 +25,7 @@ export function Composer({}: {winHeight: number}) {
// =
if (!isActive) {
return <View />
return null
}
return (