Skip to content

Commit

Permalink
fixes unread indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
rlinoz committed Nov 21, 2024
1 parent 4c44827 commit 9909d61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 9909d61

Please sign in to comment.