From 14a9f8b0b65927c43dfdf66b86e4a20be5377c1c Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 10 Sep 2024 14:55:55 -0600 Subject: [PATCH] fix tracked expenses --- src/CONST.ts | 1 + src/components/Search/index.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index cf3facb0d1d8..269227e534d6 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -771,6 +771,7 @@ const CONST = { }, MAX_COUNT_BEFORE_FOCUS_UPDATE: 30, MIN_INITIAL_REPORT_ACTION_COUNT: 15, + UNREPORTED_REPORTID: '0', SPLIT_REPORTID: '-2', ACTIONS: { LIMIT: 50, diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 8296b494b6fc..4e23c0883f84 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -281,7 +281,8 @@ function Search({queryJSON}: SearchProps) { }; const openReport = (item: TransactionListItemType | ReportListItemType | ReportActionListItemType) => { - let reportID = SearchUtils.isTransactionListItemType(item) && !item.isFromOneTransactionReport ? item.transactionThreadReportID : item.reportID; + const isFromSelfDM = item.reportID === CONST.REPORT.UNREPORTED_REPORTID; + let reportID = SearchUtils.isTransactionListItemType(item) && (!item.isFromOneTransactionReport || isFromSelfDM) ? item.transactionThreadReportID : item.reportID; if (!reportID) { return;