Skip to content

Commit d3d18de

Browse files
committed
revert using FlatList for transaction thread
1 parent cce7b40 commit d3d18de

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

src/pages/home/report/ReportActionsList.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import type {ListRenderItemInfo} from '@react-native/virtualized-lists/Lists/VirtualizedList';
22
import {useIsFocused, useRoute} from '@react-navigation/native';
33
import 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';
55
import {DeviceEventEmitter, InteractionManager, View} from 'react-native';
66
import type {OnyxEntry} from 'react-native-onyx';
77
import {renderScrollComponent} from '@components/ActionSheetAwareScrollView';
8-
import FlatList from '@components/FlatList';
98
import InvertedFlatList from '@components/InvertedFlatList';
109
import {AUTOSCROLL_TO_TOP_THRESHOLD} from '@components/InvertedFlatList/BaseInvertedFlatList';
1110
import {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

Comments
 (0)