11import type { ListRenderItemInfo } from '@react-native/virtualized-lists/Lists/VirtualizedList' ;
22import { useIsFocused , useRoute } from '@react-navigation/native' ;
33import React , { memo , useCallback , useContext , useEffect , useLayoutEffect , useMemo , useRef , useState } from 'react' ;
4- import type { LayoutChangeEvent , NativeScrollEvent , NativeSyntheticEvent , StyleProp , ViewStyle } from 'react-native' ;
4+ import type { LayoutChangeEvent , NativeScrollEvent , NativeSyntheticEvent } from 'react-native' ;
55import { DeviceEventEmitter , InteractionManager , View } from 'react-native' ;
66import type { OnyxEntry } from 'react-native-onyx' ;
77import { renderScrollComponent } from '@components/ActionSheetAwareScrollView' ;
8- import FlatList from '@components/FlatList' ;
98import InvertedFlatList from '@components/InvertedFlatList' ;
109import { AUTOSCROLL_TO_TOP_THRESHOLD } from '@components/InvertedFlatList/BaseInvertedFlatList' ;
1110import { usePersonalDetails } from '@components/OnyxProvider' ;
@@ -696,18 +695,6 @@ function ReportActionsList({
696695 // Parse Fullstory attributes on initial render
697696 useLayoutEffect ( parseFSAttributes , [ ] ) ;
698697
699- const ListComponent = isTransactionThread ( parentReportAction ) ? FlatList : InvertedFlatList ;
700-
701- const contentContainerStyle = useMemo ( ( ) => {
702- const baseStyles : StyleProp < ViewStyle > = [ styles . chatContentScrollView ] ;
703-
704- if ( isTransactionThread ( parentReportAction ) ) {
705- baseStyles . push ( styles . pb0 , styles . pt4 ) ;
706- }
707-
708- return baseStyles ;
709- } , [ parentReportAction , styles . chatContentScrollView , styles . pb0 , styles . pt4 ] ) ;
710-
711698 return (
712699 < >
713700 < FloatingMessageCounter
@@ -720,15 +707,14 @@ function ReportActionsList({
720707 nativeID = { reportActionsListTestID }
721708 fsClass = { reportActionsListFSClass }
722709 >
723- < ListComponent
710+ < InvertedFlatList
724711 accessibilityLabel = { translate ( 'sidebarScreen.listOfChatMessages' ) }
725712 ref = { reportScrollManager . ref }
726713 testID = "report-actions-list"
727714 style = { styles . overscrollBehaviorContain }
728715 data = { visibleReportActions }
729716 renderItem = { renderItem }
730717 renderScrollComponent = { renderScrollComponent }
731- contentContainerStyle = { contentContainerStyle }
732718 keyExtractor = { keyExtractor }
733719 initialNumToRender = { initialNumToRender }
734720 onEndReached = { onEndReached }
0 commit comments