diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx index 7a607051dfe4..336674915180 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx @@ -26,7 +26,6 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import {isConsecutiveChronosAutomaticTimerAction} from '@libs/ChronosUtils'; import DateUtils from '@libs/DateUtils'; -import {hasDeferredWriteForReport} from '@libs/deferredLayoutWrite'; import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID'; import {getAllNonDeletedTransactions, isActionVisibleOnMoneyRequestReport} from '@libs/MoneyRequestReportUtils'; import Navigation from '@libs/Navigation/Navigation'; @@ -654,14 +653,7 @@ function MoneyRequestReportActionsList({onLayout}: MoneyRequestReportListProps) }, [styles.chatItem.paddingBottom, styles.chatItem.paddingTop, windowHeight, linkedReportActionID]); const isReportEmpty = isEmpty(visibleReportActions) && isEmpty(transactions) && !showReportActionsLoadingState; - // hasDeferredWriteForReport is non-reactive (reads a module-level Map, not tracked by React). - // This is intentional: we only check on the initial render after the RHP dismisses. - // Once the deferred write flushes and createTransaction runs, Onyx updates make - // transactions non-empty, which drives the transition away from the skeleton. - // Scoping to `report.reportID` ensures an unrelated submit flow's pending dismiss doesn't keep - // *this* report stuck on the skeleton. - const isAwaitingDeferredTransaction = isReportEmpty && hasDeferredWriteForReport(CONST.DEFERRED_LAYOUT_WRITE_KEYS.DISMISS_MODAL, report?.reportID); - const showEmptyState = isReportEmpty && !isAwaitingDeferredTransaction; + const showEmptyState = isReportEmpty; if (!report) { return null; @@ -683,11 +675,9 @@ function MoneyRequestReportActionsList({onLayout}: MoneyRequestReportListProps) isActive={isFloatingMessageCounterVisible} onClick={scrollToBottomAndMarkReportAsRead} /> - {/* Exactly one of these three branches is active at a time: - 1. isAwaitingDeferredTransaction — skeleton while dismiss-first creates the transaction - 2. showEmptyState — genuinely empty report - 3. !isReportEmpty — report has data, render the FlatList */} - {isAwaitingDeferredTransaction && } + {/* Exactly one of these two branches is active at a time: + 1. showEmptyState — genuinely empty report + 2. !isReportEmpty — report has data, render the FlatList */} {showEmptyState && (