Skip to content

Commit

Permalink
Merge pull request #52919 from Expensify/rodrigo-fix-unread-indicator
Browse files Browse the repository at this point in the history
Fixes unread indicator
  • Loading branch information
rlinoz authored Nov 21, 2024
2 parents 0e9f934 + 9909d61 commit 075d46b
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 075d46b

Please sign in to comment.