@@ -170,7 +170,7 @@ import { getReviewSectionIdForCheckpoint } from "../review/reviewModel";
170170import { setReviewSelectedSectionId } from "../review/reviewState" ;
171171import { Menu } from "../../components/ui/Menu" ;
172172import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing" ;
173- import { useBarInset } from "../../components/ui/useBarInset" ;
173+ import { useBarInset , useContentTopInset } from "../../components/ui/useBarInset" ;
174174import { copyPromptLink } from "../prompt-links/prompt-link-actions" ;
175175import { parseReviewCommentMessageSegments } from "../review/reviewCommentSelection" ;
176176import {
@@ -332,7 +332,6 @@ export interface ThreadFeedProps {
332332 readonly keyboardOffset : number ;
333333 readonly sendingWithKeyboard ?: boolean ;
334334 readonly fitShortFeedToViewport ?: boolean ;
335- readonly contentTopInset ?: number ;
336335 readonly contentBottomInset ?: number ;
337336 readonly historyControls ?: ThreadFeedHistoryControls ;
338337 readonly contentMaxWidth ?: number ;
@@ -2772,10 +2771,12 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
27722771 const markdownContentWidth = Math . max ( 0 , contentWidth - ASSISTANT_ROW_HORIZONTAL_PADDING * 2 ) ;
27732772 const reviewCommentBubbleWidth = Math . min ( Math . max ( 280 , contentWidth * 0.85 ) , contentWidth ) ;
27742773 const barInset = useBarInset ( ) ;
2775- const topContentInset = props . contentTopInset ?? barInset ;
2774+ const columnTopInset = useContentTopInset ( ) ;
27762775 const bottomContentInset = props . contentBottomInset ?? 18 ;
27772776 const usesNativeAutomaticInsets =
27782777 props . usesAutomaticContentInsets === true && Platform . OS === "ios" ;
2778+ // Without the native contentInset, a list-header spacer clears the bar the column lays content under.
2779+ const topContentInset = usesNativeAutomaticInsets ? 0 : columnTopInset ;
27792780 const anchorTopInset = usesNativeAutomaticInsets ? barInset : topContentInset ;
27802781
27812782 const theme = useUniwindTheme ( ) ;
@@ -3200,7 +3201,9 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
32003201 if ( state ) onIsAtEndChange ?.( state . isAtEnd ) ;
32013202 } ;
32023203 const handleScroll = ( event : NativeSyntheticEvent < NativeScrollEvent > ) => {
3203- reportHeaderMaterialVisibility ( event . nativeEvent . contentOffset . y + anchorTopInset > 6 ) ;
3204+ reportHeaderMaterialVisibility (
3205+ event . nativeEvent . contentOffset . y + ( usesNativeAutomaticInsets ? barInset : 0 ) > 6 ,
3206+ ) ;
32043207 handleMetricsChange ( ) ;
32053208 } ;
32063209 // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to the list's end state to report it to the parent
0 commit comments