diff --git a/modules/expo-scroll-forwarder/ios/ExpoScrollForwarderView.swift b/modules/expo-scroll-forwarder/ios/ExpoScrollForwarderView.swift index 8e60bff523..2af35da189 100644 --- a/modules/expo-scroll-forwarder/ios/ExpoScrollForwarderView.swift +++ b/modules/expo-scroll-forwarder/ios/ExpoScrollForwarderView.swift @@ -77,8 +77,9 @@ class ExpoScrollForwarderView: ExpoView, UIGestureRecognizerDelegate { if sender.state == .began { // Use max(0) so gesture deltas compute correctly, but don't mutate - // contentOffset — snapping it to 0 causes a visible jump on profiles - // with large headers where the user is scrolled into negative territory. + // contentOffset + // snapping it to 0 causes a visible jump on profiles with large headers + // where the user is scrolled into negative territory. - sfp self.initialOffset = max(sv.contentOffset.y, 0) } diff --git a/src/view/com/pager/PagerWithHeader.tsx b/src/view/com/pager/PagerWithHeader.tsx index b91ef65c38..be28ad864b 100644 --- a/src/view/com/pager/PagerWithHeader.tsx +++ b/src/view/com/pager/PagerWithHeader.tsx @@ -160,8 +160,8 @@ export function PagerWithHeader({ // load. We filter it out, but only until the first real scroll event has // been accepted. After that we stop filtering so that legitimate // scroll-to-top events (which also target -headerHeight) are not rejected. - // The old heuristic assumed "you'd never be overscrolled by 400px" but - // profiles with very large headers DO scroll to -headerHeight normally. -sfn + // profiles with very large headers DO scroll to -headerHeight normally, + // so we need to adjust the heuristic. - sfp const hasReceivedScroll = useSharedValue(false) const onScrollWorklet = useCallback( (e: NativeScrollEvent) => { @@ -301,7 +301,7 @@ let PagerTabBar = ({ // Re-measure when the header content changes size (e.g. // SuggestedFollows accordion expanding/collapsing). The sentinel // view below only fires onLayout once on mount, so without this - // the headerOnlyHeight goes stale. + // the headerOnlyHeight goes stale. - sfp const rounded = Math.round(height * 2) / 2 if (rounded > 0 && rounded !== headerOnlyHeight) { onHeaderOnlyLayout(height)