Skip to content

Commit 0eaf9f7

Browse files
authored
Merge pull request #91862 from callstack-internal/VickyStash/bugfix/91584-change-thread-styling
2 parents 650d46c + 07b464f commit 0eaf9f7

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/pages/inbox/report/ReportActionsList.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,10 @@ function ReportActionsList({
826826
// In case of an error we want to display the header no matter what.
827827
if (!canShowHeader) {
828828
hasHeaderRendered.current = true;
829-
return null;
829+
830+
// Empty spacer so FlashList wraps a header and ListHeaderComponentStyle (flex: 1) applies —
831+
// the wrapper sits at the visual bottom of the inverted list and pins items to the visual top.
832+
return shouldBeAlignedToTop ? <View /> : null;
830833
}
831834

832835
return (
@@ -836,7 +839,7 @@ function ReportActionsList({
836839
hasActiveDraft={hasActiveDraft}
837840
/>
838841
);
839-
}, [canShowHeader, hasActiveDraft, report.reportID, retryLoadNewerChatsError]);
842+
}, [canShowHeader, hasActiveDraft, report.reportID, retryLoadNewerChatsError, shouldBeAlignedToTop]);
840843

841844
const shouldShowSkeleton = isOffline && !sortedVisibleReportActions.some((action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED);
842845

@@ -907,12 +910,13 @@ function ReportActionsList({
907910
keyExtractor={keyExtractor}
908911
drawDistance={1500}
909912
renderScrollComponent={renderActionSheetAwareScrollView}
910-
contentContainerStyle={[styles.chatContentScrollView, shouldBeAlignedToTop && styles.justifyContentEnd]}
913+
contentContainerStyle={styles.chatContentScrollView}
911914
onEndReached={onEndReached}
912915
onEndReachedThreshold={0.75}
913916
onStartReached={handleStartReached}
914917
onStartReachedThreshold={0.75}
915918
ListHeaderComponent={listHeaderComponent}
919+
ListHeaderComponentStyle={shouldBeAlignedToTop ? styles.flex1 : undefined}
916920
ListFooterComponent={listFooterComponent}
917921
keyboardShouldPersistTaps="handled"
918922
onLayout={onLayoutInner}

0 commit comments

Comments
 (0)