Only enable keyboard controller when necessary (#4483)
* Only enable keyboard controller when necessary * make it screen only * rm keyboard padding * rm keyboardpadding file * revert using keyboard controller in composer * remove styles.outer (unnecessary for revert) * continue to use keyboard padding in the report dialog for dms --------- Co-authored-by: Hailey <me@haileyok.com>
This commit is contained in:
parent
aca0fa23ec
commit
3d4b390a8a
13 changed files with 191 additions and 206 deletions
|
@ -1,5 +1,6 @@
|
|||
import React, {useCallback} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {useKeyboardController} from 'react-native-keyboard-controller'
|
||||
import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
@ -34,6 +35,17 @@ export function MessagesConversationScreen({route}: Props) {
|
|||
const convoId = route.params.conversation
|
||||
const {setCurrentConvoId} = useCurrentConvoId()
|
||||
|
||||
const {setEnabled} = useKeyboardController()
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
if (isWeb) return
|
||||
setEnabled(true)
|
||||
return () => {
|
||||
setEnabled(false)
|
||||
}
|
||||
}, [setEnabled]),
|
||||
)
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
setCurrentConvoId(convoId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue