@@ -6,7 +6,6 @@ import React, {forwardRef, useCallback, useContext, useEffect, useImperativeHand
66import type { EmitterSubscription , GestureResponderEvent , NativeTouchEvent , View } from 'react-native' ;
77import { DeviceEventEmitter , Dimensions , InteractionManager } from 'react-native' ;
88import type { OnyxEntry } from 'react-native-onyx' ;
9- import { useOnyx } from 'react-native-onyx' ;
109import { Actions , ActionSheetAwareScrollViewContext } from '@components/ActionSheetAwareScrollView' ;
1110import ConfirmModal from '@components/ConfirmModal' ;
1211import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent' ;
@@ -17,7 +16,6 @@ import {deleteReportComment} from '@libs/actions/Report';
1716import calculateAnchorPosition from '@libs/calculateAnchorPosition' ;
1817import { getOriginalMessage , isMoneyRequestAction , isTrackExpenseAction } from '@libs/ReportActionsUtils' ;
1918import CONST from '@src/CONST' ;
20- import ONYXKEYS from '@src/ONYXKEYS' ;
2119import type { AnchorDimensions } from '@src/styles' ;
2220import type { ReportAction } from '@src/types/onyx' ;
2321import BaseReportActionContextMenu from './BaseReportActionContextMenu' ;
@@ -38,7 +36,6 @@ function extractPointerEvent(event: GestureResponderEvent | MouseEvent): MouseEv
3836
3937function PopoverReportActionContextMenu ( _props : unknown , ref : ForwardedRef < ReportActionContextMenu > ) {
4038 const { translate} = useLocalize ( ) ;
41- const [ pdfsPaths ] = useOnyx ( ONYXKEYS . CACHED_PDF_PATHS , { canBeMissing : true } ) ;
4239 const reportIDRef = useRef < string | undefined > ( undefined ) ;
4340 const typeRef = useRef < ContextMenuType | undefined > ( undefined ) ;
4441 const reportActionRef = useRef < NonNullable < OnyxEntry < ReportAction > > | null > ( null ) ;
@@ -298,19 +295,19 @@ function PopoverReportActionContextMenu(_props: unknown, ref: ForwardedRef<Repor
298295 if ( isMoneyRequestAction ( reportAction ) ) {
299296 const originalMessage = getOriginalMessage ( reportAction ) ;
300297 if ( isTrackExpenseAction ( reportAction ) ) {
301- deleteTrackExpense ( reportIDRef . current , originalMessage ?. IOUTransactionID , reportAction , duplicateTransactions , duplicateTransactionViolations , false , pdfsPaths ?? { } ) ;
298+ deleteTrackExpense ( reportIDRef . current , originalMessage ?. IOUTransactionID , reportAction , duplicateTransactions , duplicateTransactionViolations ) ;
302299 } else {
303- deleteMoneyRequest ( originalMessage ?. IOUTransactionID , reportAction , duplicateTransactions , duplicateTransactionViolations , false , undefined , pdfsPaths ?? { } ) ;
300+ deleteMoneyRequest ( originalMessage ?. IOUTransactionID , reportAction , duplicateTransactions , duplicateTransactionViolations ) ;
304301 }
305302 } else if ( reportAction ) {
306303 InteractionManager . runAfterInteractions ( ( ) => {
307- deleteReportComment ( reportIDRef . current , reportAction , pdfsPaths ?? { } ) ;
304+ deleteReportComment ( reportIDRef . current , reportAction ) ;
308305 } ) ;
309306 }
310307
311308 DeviceEventEmitter . emit ( `deletedReportAction_${ reportIDRef . current } ` , reportAction ?. reportActionID ) ;
312309 setIsDeleteCommentConfirmModalVisible ( false ) ;
313- } , [ pdfsPaths , duplicateTransactions , duplicateTransactionViolations ] ) ;
310+ } , [ duplicateTransactions , duplicateTransactionViolations ] ) ;
314311
315312 const hideDeleteModal = ( ) => {
316313 callbackWhenDeleteModalHide . current = ( ) => ( onCancelDeleteModal . current = runAndResetCallback ( onCancelDeleteModal . current ) ) ;
0 commit comments