From bd0852d0a251b58188bd12b686c78ac55d89947b Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 5 Jun 2026 11:50:00 +0300 Subject: [PATCH] fix feed scroll reset on device rotation Remove the dead contentOffset prop from List and add maintainVisibleContentPosition to anchor the visible item across relayouts. The negative contentOffset was originally paired with a matching contentInset (web PR #230) so the first render sat flush under the floating header. PR #2216 swapped the inset for a paddingTop style but left the offset behind, where it's been dead on initial render since. On rotation its value changes (it's partly derived from the top safe -area inset), and RN re-applies it as an absolute scroll, snapping the list. maintainVisibleContentPosition then keeps the visible post pinned as items reflow to the new width. APP-2315 Co-Authored-By: Claude Opus 4.8 (1M context) --- src/view/com/util/List.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index cde8d50c48..65e1aabb90 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -147,17 +147,19 @@ let List = forwardRef( ) } - let contentOffset if (headerOffset != null) { style = addStyle(style, { paddingTop: headerOffset, }) - contentOffset = {x: 0, y: headerOffset * -1} } return ( ( ...props.scrollIndicatorInsets, }} indicatorStyle={t.scheme === 'dark' ? 'white' : 'black'} - contentOffset={contentOffset} refreshControl={refreshControl} onScroll={scrollHandler} scrollsToTop={scrollsToTop}