@@ -108,6 +108,7 @@ function ReportActionsView({
108108 const reportPreviewAction = useMemo ( ( ) => getReportPreviewAction ( report . chatReportID , report . reportID ) , [ report . chatReportID , report . reportID ] ) ;
109109 const didLayout = useRef ( false ) ;
110110 const { isOffline} = useNetwork ( ) ;
111+ const [ policy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ report . policyID } ` , { canBeMissing : true } ) ;
111112
112113 const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
113114 const isFocused = useIsFocused ( ) ;
@@ -222,10 +223,10 @@ function ReportActionsView({
222223 reportActions . filter (
223224 ( reportAction ) =>
224225 ( isOffline || isDeletedParentAction ( reportAction ) || reportAction . pendingAction !== CONST . RED_BRICK_ROAD_PENDING_ACTION . DELETE || reportAction . errors ) &&
225- shouldReportActionBeVisible ( reportAction , reportAction . reportActionID , canPerformWriteAction ) &&
226+ shouldReportActionBeVisible ( reportAction , reportAction . reportActionID , canPerformWriteAction , policy ) &&
226227 isIOUActionMatchingTransactionList ( reportAction , reportTransactionIDs ) ,
227228 ) ,
228- [ reportActions , isOffline , canPerformWriteAction , reportTransactionIDs ] ,
229+ [ reportActions , isOffline , canPerformWriteAction , policy , reportTransactionIDs ] ,
229230 ) ;
230231
231232 const newestReportAction = useMemo ( ( ) => reportActions ?. at ( 0 ) , [ reportActions ] ) ;
0 commit comments