From 3d31d746d51b01d046fee4230c17e187f1927a2e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 12 Dec 2024 09:20:16 -0700 Subject: [PATCH] Merge pull request #54042 from Expensify/revert-53722-cmartins-fixOnePay [CP Staging] Revert "Fix pay button after deleting expense" (cherry picked from commit 40ccc776bca5d4279b84d45f849789472ec6a456) (CP triggered by luacmartins) --- src/libs/SearchUIUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 86f7aaaecce9..2d0fa12a6d2c 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -265,8 +265,8 @@ function getAction(data: OnyxTypes.SearchResults['data'], key: string): SearchTr return CONST.SEARCH.ACTION_TYPES.DONE; } - // We don't need to run the logic if this is not an iou/expense report, so let's shortcircuit the logic for performance reasons - if (!ReportUtils.isMoneyRequestReport(report)) { + // We don't need to run the logic if this is not a transaction or iou/expense report, so let's shortcircuit the logic for performance reasons + if (!ReportUtils.isMoneyRequestReport(report) || (isTransaction && !data[key].isFromOneTransactionReport)) { return CONST.SEARCH.ACTION_TYPES.VIEW; }