From 07b464f9f41a1b8877d170bfc913566d02c53b1e Mon Sep 17 00:00:00 2001 From: VickyStash Date: Wed, 27 May 2026 17:52:10 +0200 Subject: [PATCH] Replace transaction thread alignment to top styling --- src/pages/inbox/report/ReportActionsList.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/inbox/report/ReportActionsList.tsx b/src/pages/inbox/report/ReportActionsList.tsx index b1fa59b4d916..f172c864c1ee 100644 --- a/src/pages/inbox/report/ReportActionsList.tsx +++ b/src/pages/inbox/report/ReportActionsList.tsx @@ -821,7 +821,10 @@ function ReportActionsList({ // In case of an error we want to display the header no matter what. if (!canShowHeader) { hasHeaderRendered.current = true; - return null; + + // Empty spacer so FlashList wraps a header and ListHeaderComponentStyle (flex: 1) applies — + // the wrapper sits at the visual bottom of the inverted list and pins items to the visual top. + return shouldBeAlignedToTop ? : null; } return ( @@ -831,7 +834,7 @@ function ReportActionsList({ hasActiveDraft={hasActiveDraft} /> ); - }, [canShowHeader, hasActiveDraft, report.reportID, retryLoadNewerChatsError]); + }, [canShowHeader, hasActiveDraft, report.reportID, retryLoadNewerChatsError, shouldBeAlignedToTop]); const shouldShowSkeleton = isOffline && !sortedVisibleReportActions.some((action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED); @@ -902,12 +905,13 @@ function ReportActionsList({ keyExtractor={keyExtractor} drawDistance={1500} renderScrollComponent={renderActionSheetAwareScrollView} - contentContainerStyle={[styles.chatContentScrollView, shouldBeAlignedToTop && styles.justifyContentEnd]} + contentContainerStyle={styles.chatContentScrollView} onEndReached={onEndReached} onEndReachedThreshold={0.75} onStartReached={handleStartReached} onStartReachedThreshold={0.75} ListHeaderComponent={listHeaderComponent} + ListHeaderComponentStyle={shouldBeAlignedToTop ? styles.flex1 : undefined} ListFooterComponent={listFooterComponent} keyboardShouldPersistTaps="handled" onLayout={onLayoutInner}