diff options
author | Hailey <me@haileyok.com> | 2024-05-22 19:44:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 19:44:37 -0700 |
commit | 69f468485928f7c325eef8854caa177d72da2f0c (patch) | |
tree | cd6cdfd5824d86d78b085b897e9798e020b83506 | |
parent | 8938fc87a089cc51cabcb7d69ec56d0c69bfffcb (diff) | |
download | voidsky-69f468485928f7c325eef8854caa177d72da2f0c.tar.zst |
Handle zero bottom inset on iOS (#4184)
* set message padding to a minimum of 60 and max of 70 * adjust range
-rw-r--r-- | src/screens/Messages/Conversation/MessagesList.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/screens/Messages/Conversation/MessagesList.tsx b/src/screens/Messages/Conversation/MessagesList.tsx index ce466d95e..a03d6bc03 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) |