reenable tabs (#3847)
parent
19a6bdcc86
commit
55f3df5596
|
@ -10,14 +10,13 @@ import {KeyboardAvoidingView} from 'react-native-keyboard-controller'
|
||||||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {useFocusEffect} from '@react-navigation/native'
|
|
||||||
|
|
||||||
|
import {isIOS} from '#/platform/detection'
|
||||||
import {useChat} from '#/state/messages'
|
import {useChat} from '#/state/messages'
|
||||||
import {ConvoItem, ConvoStatus} from '#/state/messages/convo'
|
import {ConvoItem, ConvoStatus} from '#/state/messages/convo'
|
||||||
import {useSetMinimalShellMode} from '#/state/shell'
|
|
||||||
import {MessageInput} from '#/screens/Messages/Conversation/MessageInput'
|
import {MessageInput} from '#/screens/Messages/Conversation/MessageInput'
|
||||||
import {MessageListError} from '#/screens/Messages/Conversation/MessageListError'
|
import {MessageListError} from '#/screens/Messages/Conversation/MessageListError'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a, useBreakpoints} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {MessageItem} from '#/components/dms/MessageItem'
|
import {MessageItem} from '#/components/dms/MessageItem'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
|
@ -123,20 +122,14 @@ export function MessagesList() {
|
||||||
[],
|
[],
|
||||||
)
|
)
|
||||||
|
|
||||||
const setMinShellMode = useSetMinimalShellMode()
|
|
||||||
useFocusEffect(
|
|
||||||
useCallback(() => {
|
|
||||||
setMinShellMode(true)
|
|
||||||
return () => setMinShellMode(false)
|
|
||||||
}, [setMinShellMode]),
|
|
||||||
)
|
|
||||||
|
|
||||||
const {bottom: bottomInset} = useSafeAreaInsets()
|
const {bottom: bottomInset} = useSafeAreaInsets()
|
||||||
|
const {gtMobile} = useBreakpoints()
|
||||||
|
const bottomBarHeight = gtMobile ? 0 : isIOS ? 40 : 60
|
||||||
const keyboardVerticalOffset = useKeyboardVerticalOffset()
|
const keyboardVerticalOffset = useKeyboardVerticalOffset()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KeyboardAvoidingView
|
<KeyboardAvoidingView
|
||||||
style={[a.flex_1, {marginBottom: bottomInset}]}
|
style={[a.flex_1, {marginBottom: bottomInset + bottomBarHeight}]}
|
||||||
keyboardVerticalOffset={keyboardVerticalOffset}
|
keyboardVerticalOffset={keyboardVerticalOffset}
|
||||||
behavior="padding"
|
behavior="padding"
|
||||||
contentContainerStyle={a.flex_1}>
|
contentContainerStyle={a.flex_1}>
|
||||||
|
|
Loading…
Reference in New Issue