diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 707c016c130bd..d3dac4e1d2b91 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -514,7 +514,7 @@ function ReportActionsList({ onScroll?.(event); }; - const scrollToBottomAndMarkReportAsRead = () => { + const scrollToBottomAndMarkReportAsRead = useCallback(() => { if (!hasNewestReportAction) { Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.reportID)); openReport(report.reportID); @@ -524,7 +524,7 @@ function ReportActionsList({ reportScrollManager.scrollToBottom(); readActionSkipped.current = false; readNewestAction(report.reportID); - }; + }, [report.reportID, reportScrollManager, hasNewestReportAction]); /** * Calculates the ideal number of report actions to render in the first render, based on the screen height and on