From 69f468485928f7c325eef8854caa177d72da2f0c Mon Sep 17 00:00:00 2001 From: Hailey Date: Wed, 22 May 2024 19:44:37 -0700 Subject: [PATCH] Handle zero bottom inset on iOS (#4184) * set message padding to a minimum of 60 and max of 70 * adjust range --- src/screens/Messages/Conversation/MessagesList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screens/Messages/Conversation/MessagesList.tsx b/src/screens/Messages/Conversation/MessagesList.tsx index ce466d95..a03d6bc0 100644 --- a/src/screens/Messages/Conversation/MessagesList.tsx +++ b/src/screens/Messages/Conversation/MessagesList.tsx @@ -16,10 +16,11 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context' import {AppBskyRichtextFacet, RichText} from '@atproto/api' import {shortenLinks} from '#/lib/strings/rich-text-manip' -import {isIOS, isNative} from '#/platform/detection' +import {isNative} from '#/platform/detection' import {isConvoActive, useConvoActive} from '#/state/messages/convo' import {ConvoItem, ConvoStatus} from '#/state/messages/convo/types' import {useAgent} from '#/state/session' +import {clamp} from 'lib/numbers' import {ScrollProvider} from 'lib/ScrollContext' import {isWeb} from 'platform/detection' import {List} from 'view/com/util/List' @@ -221,8 +222,7 @@ export function MessagesList({ // -- Keyboard animation handling const {bottom: bottomInset} = useSafeAreaInsets() - const nativeBottomBarHeight = isIOS ? 42 : 60 - const bottomOffset = isWeb ? 0 : bottomInset + nativeBottomBarHeight + const bottomOffset = isWeb ? 0 : clamp(60 + bottomInset, 60, 75) const keyboardHeight = useSharedValue(0) const keyboardIsOpening = useSharedValue(false)