From 8221dbff7b2c9bd9252ab14523e549efc13f42c5 Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj Date: Tue, 19 May 2026 16:31:42 +0200 Subject: [PATCH] fix: respect topInset on bottom sheet once again --- examples/ExpoMessaging/app/channel/[cid]/index.tsx | 1 + .../ExpoMessaging/app/channel/[cid]/thread/[cid]/index.tsx | 1 + package/src/components/AttachmentPicker/AttachmentPicker.tsx | 3 ++- package/src/components/Channel/Channel.tsx | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/ExpoMessaging/app/channel/[cid]/index.tsx b/examples/ExpoMessaging/app/channel/[cid]/index.tsx index 0410bec2f6..fa8be06f86 100644 --- a/examples/ExpoMessaging/app/channel/[cid]/index.tsx +++ b/examples/ExpoMessaging/app/channel/[cid]/index.tsx @@ -73,6 +73,7 @@ export default function ChannelScreen() { channel={channel} onPressMessage={onPressMessage} keyboardVerticalOffset={headerHeight} + topInset={headerHeight} thread={thread} > diff --git a/package/src/components/AttachmentPicker/AttachmentPicker.tsx b/package/src/components/AttachmentPicker/AttachmentPicker.tsx index 4df1abec1b..cd4d786930 100644 --- a/package/src/components/AttachmentPicker/AttachmentPicker.tsx +++ b/package/src/components/AttachmentPicker/AttachmentPicker.tsx @@ -39,6 +39,7 @@ export const AttachmentPicker = () => { attachmentPickerBottomSheetHeight, bottomSheetRef: ref, bottomInset, + topInset, disableAttachmentPicker, } = useAttachmentPickerContext(); const { AttachmentPickerContent, AttachmentPickerSelectionBar } = useComponentsContext(); @@ -94,7 +95,7 @@ export const AttachmentPicker = () => { const initialSnapPoint = attachmentPickerBottomSheetHeight; const pickerTopInset = Math.max( 0, - windowHeight - attachmentPickerBottomSheetHeight - bottomInset, + windowHeight - topInset - attachmentPickerBottomSheetHeight - bottomInset, ); /** diff --git a/package/src/components/Channel/Channel.tsx b/package/src/components/Channel/Channel.tsx index 2ea9bc41af..52070c39b8 100644 --- a/package/src/components/Channel/Channel.tsx +++ b/package/src/components/Channel/Channel.tsx @@ -496,7 +496,7 @@ const ChannelWithContext = (props: PropsWithChildren) = thread: threadFromProps, threadList, threadMessages, - topInset, + topInset = 0, isOnline, maximumMessageLimit, initializeOnMount = true,