From 9909d61dd08f52066c9f3d288b9582a12d724813 Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Thu, 21 Nov 2024 13:18:43 -0300 Subject: [PATCH] fixes unread indicator --- src/pages/home/report/ReportActionsList.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index f8b58cffd225..57d3c48e3b61 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -182,6 +182,8 @@ function ReportActionsList({ const hasFooterRendered = useRef(false); const linkedReportActionID = route?.params?.reportActionID ?? '-1'; + const canUserPerformWriteAction = ReportUtils.canUserPerformWriteAction(report); + const sortedVisibleReportActions = useMemo( () => sortedReportActions.filter( @@ -190,9 +192,9 @@ function ReportActionsList({ ReportActionsUtils.isDeletedParentAction(reportAction) || reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || reportAction.errors) && - ReportActionsUtils.shouldReportActionBeVisible(reportAction, reportAction.reportActionID, ReportUtils.canUserPerformWriteAction(report)), + ReportActionsUtils.shouldReportActionBeVisible(reportAction, reportAction.reportActionID, canUserPerformWriteAction), ), - [sortedReportActions, isOffline, report], + [sortedReportActions, isOffline, canUserPerformWriteAction], ); const lastAction = sortedVisibleReportActions.at(0); const sortedVisibleReportActionsObjects: OnyxTypes.ReportActions = useMemo(