Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ function ReportActionsList({
const isTryNewDotNVPDismissed = !!tryNewDot?.classicRedirect?.dismissed;
const [isScrollToBottomEnabled, setIsScrollToBottomEnabled] = useState(false);
const [actionIdToHighlight, setActionIdToHighlight] = useState('');
const [reportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${report.reportID}`, {canBeMissing: true});

const backTo = route?.params?.backTo as string;
// Display the new message indicator when comment linking and not close to the newest message.
Expand Down Expand Up @@ -406,11 +405,6 @@ function ReportActionsList({
return;
}

// Do not try to mark the report as read if the report has not been loaded and shared with the user
if (!reportMetadata?.hasOnceLoadedReportActions) {
return;
}

if (isUnread(report, transactionThreadReport, isReportArchived) || (lastAction && isCurrentActionUnread(report, lastAction, sortedVisibleReportActions))) {
// On desktop, when the notification center is displayed, isVisible will return false.
// Currently, there's no programmatic way to dismiss the notification center panel.
Expand All @@ -427,7 +421,7 @@ function ReportActionsList({
readActionSkipped.current = true;
}
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [report.lastVisibleActionCreated, transactionThreadReport?.lastVisibleActionCreated, report.reportID, isVisible, reportMetadata?.hasOnceLoadedReportActions]);
}, [report.lastVisibleActionCreated, transactionThreadReport?.lastVisibleActionCreated, report.reportID, isVisible]);

const handleAppVisibilityMarkAsRead = useCallback(() => {
if (report.reportID !== prevReportID) {
Expand Down
Loading