diff --git a/src/pages/inbox/report/ReportActionsList.tsx b/src/pages/inbox/report/ReportActionsList.tsx index 6dcfc64e201e..1e9dd91d3ff6 100644 --- a/src/pages/inbox/report/ReportActionsList.tsx +++ b/src/pages/inbox/report/ReportActionsList.tsx @@ -6,14 +6,12 @@ import type {LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent} from 'r import {DeviceEventEmitter, InteractionManager, View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import {renderScrollComponent as renderActionSheetAwareScrollView} from '@components/ActionSheetAwareScrollView'; -import Button from '@components/Button'; import InvertedFlashList from '@components/FlashList/InvertedFlashList'; import getShowScrollIndicator from '@components/FlashList/InvertedFlashList/getShowScrollIndicator'; import {usePersonalDetails} from '@components/OnyxListItemProvider'; import ReportActionsSkeletonView from '@components/ReportActionsSkeletonView'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useIsAnonymousUser from '@hooks/useIsAnonymousUser'; -import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useNetworkWithOfflineStatus from '@hooks/useNetworkWithOfflineStatus'; import useOnyx from '@hooks/useOnyx'; @@ -62,7 +60,6 @@ import { } from '@libs/ReportUtils'; import Visibility from '@libs/Visibility'; import type {ReportsSplitNavigatorParamList} from '@navigation/types'; -import ConciergeThinkingMessage from '@pages/home/report/ConciergeThinkingMessage'; import {ActionListContext} from '@pages/inbox/ReportScreenContext'; import variables from '@styles/variables'; import {openReport, readNewestAction, subscribeToNewActionEvent} from '@userActions/Report'; @@ -74,9 +71,10 @@ import type * as OnyxTypes from '@src/types/onyx'; import FloatingMessageCounter from './FloatingMessageCounter'; import getInitialNumToRender from './getInitialNumReportActionsToRender'; import getReportActionsListInitialNumToRender from './getReportActionsListInitialNumToRender'; -import ListBoundaryLoader from './ListBoundaryLoader'; +import ReportActionsListHeader from './ReportActionsListHeader'; import ReportActionsListItemRenderer from './ReportActionsListItemRenderer'; import {getUnreadMarkerReportAction} from './shouldDisplayNewMarkerOnReportAction'; +import ShowPreviousMessagesButton from './ShowPreviousMessagesButton'; import StaticReportActionsPreview from './StaticReportActionsPreview'; import useReportUnreadMessageScrollTracking from './useReportUnreadMessageScrollTracking'; @@ -120,9 +118,6 @@ type ReportActionsListProps = { /** Whether the optimistic CREATED report action was added */ hasCreatedActionAdded?: boolean; - /** Whether this is a Concierge chat in the side panel */ - isConciergeSidePanel?: boolean; - /** Whether the chat history is hidden (concierge side panel fresh state) */ showHiddenHistory?: boolean; @@ -166,7 +161,6 @@ function ReportActionsList({ listID, parentReportActionForTransactionThread, hasCreatedActionAdded, - isConciergeSidePanel, showHiddenHistory, hasPreviousMessages, onShowPreviousMessages, @@ -177,7 +171,6 @@ function ReportActionsList({ const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); const {translate} = useLocalize(); - const expensifyIcons = useMemoizedLazyExpensifyIcons(['UpArrow']); const {windowHeight} = useWindowDimensions(); const {shouldUseNarrowLayout} = useResponsiveLayout(); @@ -701,7 +694,6 @@ function ReportActionsList({ const renderItem = useCallback( ({item: reportAction, index}: ListRenderItemInfo) => { const originalReportID = getOriginalReportID(report.reportID, reportAction, reportActionsFromOnyx); - const showPreviousMessagesButton = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED && !!isConciergeSidePanel && !!showHiddenHistory && !!hasPreviousMessages; // Use the action's actual index in sortedVisibleReportActions rather than the FlashList-provided index, // because useFlashListScrollKey may slice the data for deep-link scroll positioning, making the @@ -735,21 +727,13 @@ function ReportActionsList({ reportNameValuePairsOrigin={reportNameValuePairs?.origin} reportNameValuePairsOriginalID={reportNameValuePairs?.originalID} /> - {showPreviousMessagesButton && ( - - - -