diff options
author | Hailey <me@haileyok.com> | 2024-06-06 12:15:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 12:15:36 -0700 |
commit | 885ad2c7564ea81e35f00d2d1b04ecbbe3aca6ec (patch) | |
tree | 179afbae71c2f233176d60c6847290f45f7195e5 /src | |
parent | fef16e060f3931ed3e731ce228cfb14510a934a2 (diff) | |
download | voidsky-885ad2c7564ea81e35f00d2d1b04ecbbe3aca6ec.tar.zst |
disable keyboard controller in the composer screen (#4399)
* disable keyboard controller in the composer screen * add comment * oops * destructure * rename to keyboard context for clarity * move destructure * cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 862e36625..580748839 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -17,6 +17,7 @@ import { import { KeyboardAvoidingView, KeyboardStickyView, + useKeyboardContext, } from 'react-native-keyboard-controller' import Animated, { interpolateColor, @@ -129,6 +130,17 @@ export const ComposePost = observer(function ComposePost({ const {closeAllDialogs} = useDialogStateControlContext() const t = useTheme() + // Disable this in the composer to prevent any extra keyboard height being applied. + // See https://github.com/bluesky-social/social-app/pull/4399 + const {setEnabled} = useKeyboardContext() + React.useEffect(() => { + setEnabled(false) + + return () => { + setEnabled(true) + } + }, [setEnabled]) + const [isKeyboardVisible] = useIsKeyboardVisible({iosUseWillEvents: true}) const [isProcessing, setIsProcessing] = useState(false) const [processingState, setProcessingState] = useState('') |