@@ -1472,10 +1472,10 @@ function isOneTransactionReport(reportID: string): boolean {
1472
1472
/**
1473
1473
* Checks if a report is a transaction thread associated with a report that has only one transaction
1474
1474
*/
1475
- function isOneTransactionThread ( reportID : string , parentReportID : string ) : boolean {
1475
+ function isOneTransactionThread ( reportID : string , parentReportID : string , threadParentReportAction : OnyxEntry < ReportAction > ) : boolean {
1476
1476
const parentReportActions = allReportActions ?. [ `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ parentReportID } ` ] ?? ( [ ] as ReportAction [ ] ) ;
1477
1477
const transactionThreadReportID = ReportActionsUtils . getOneTransactionThreadReportID ( parentReportID , parentReportActions ) ;
1478
- return reportID === transactionThreadReportID ;
1478
+ return reportID === transactionThreadReportID && ! ReportActionsUtils . isSentMoneyReportAction ( threadParentReportAction ) ;
1479
1479
}
1480
1480
1481
1481
/**
@@ -5426,6 +5426,8 @@ function shouldReportBeInOptionList({
5426
5426
// This can also happen for anyone accessing a public room or archived room for which they don't have access to the underlying policy.
5427
5427
// Optionally exclude reports that do not belong to currently active workspace
5428
5428
5429
+ const parentReportAction = ReportActionsUtils . getParentReportAction ( report ) ;
5430
+
5429
5431
if (
5430
5432
! report ?. reportID ||
5431
5433
! report ?. type ||
@@ -5456,7 +5458,7 @@ function shouldReportBeInOptionList({
5456
5458
}
5457
5459
5458
5460
// If this is a transaction thread associated with a report that only has one transaction, omit it
5459
- if ( isOneTransactionThread ( report . reportID , report . parentReportID ?? '-1' ) ) {
5461
+ if ( isOneTransactionThread ( report . reportID , report . parentReportID ?? '-1' , parentReportAction ) ) {
5460
5462
return false ;
5461
5463
}
5462
5464
@@ -5529,8 +5531,6 @@ function shouldReportBeInOptionList({
5529
5531
return false ;
5530
5532
}
5531
5533
5532
- const parentReportAction = ReportActionsUtils . getParentReportAction ( report ) ;
5533
-
5534
5534
// Hide chat threads where the parent message is pending removal
5535
5535
if (
5536
5536
! isEmptyObject ( parentReportAction ) &&
0 commit comments