@@ -36,7 +36,7 @@ import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';
3636import Navigation from '@libs/Navigation/Navigation' ;
3737import { getPersonalDetailsForAccountIDs } from '@libs/OptionsListUtils' ;
3838import Parser from '@libs/Parser' ;
39- import { getOneTransactionThreadReportID , getReportActions , isMessageDeleted } from '@libs/ReportActionsUtils' ;
39+ import { getOneTransactionThreadReportID , getReportActions } from '@libs/ReportActionsUtils' ;
4040import {
4141 canJoinChat ,
4242 canUserPerformWriteAction ,
@@ -142,18 +142,17 @@ function HeaderView({report, parentReportAction, onNavigationMenuButtonClicked,
142142 const isTaskReport = isTaskReportReportUtils ( report ) ;
143143 const [ parentOfParentReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ parentReport ?. parentReportID } ` , { canBeMissing : true } ) ;
144144 const { isOffline} = useNetwork ( ) ;
145- const visibleParentOfParentReportActions = useMemo ( ( ) => {
146- if ( ! parentOfParentReport ) {
147- return ;
148- }
149-
150- const allReportActions = getReportActions ( parentOfParentReport ) ;
151- return Object . values ( allReportActions ?? { } ) . filter ( ( action ) => ! isMessageDeleted ( action ) || ( action . pendingAction === CONST . RED_BRICK_ROAD_PENDING_ACTION . DELETE && isOffline ) ) ;
152- } , [ parentOfParentReport , isOffline ] ) ;
153145 const reportHeaderData =
154146 ( ( ! isTaskReport && ! isChatThread ) ||
155147 ( parentOfParentReport &&
156- ! ! getOneTransactionThreadReportID ( parentOfParentReport , getReportOrDraftReport ( parentOfParentReport ?. chatReportID ) , visibleParentOfParentReportActions ) ) ) &&
148+ ! ! getOneTransactionThreadReportID (
149+ parentOfParentReport ,
150+ getReportOrDraftReport ( parentOfParentReport ?. chatReportID ) ,
151+ getReportActions ( parentOfParentReport ) ,
152+ isOffline ,
153+ undefined ,
154+ true ,
155+ ) ) ) &&
157156 report ?. parentReportID
158157 ? parentReport
159158 : report ;
0 commit comments