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

(cherry picked from commit 075d46b)

(CP triggered by chiragsalian)
  • Loading branch information
rlinoz authored and OSBotify committed Nov 21, 2024
1 parent 94a05ec commit 393d240
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 393d240

Please sign in to comment.