Skip to content

Commit

Permalink
fix/34829: only mark as read if changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-croff committed Jan 25, 2024
1 parent 1a1b84c commit da88368
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ function ReportActionsList({
}, [report.reportID]);

const readNewestReportActionOnFocus = () => {
if (!userActiveSince.current || report.reportID !== prevReportID) {
return;
}
if (ReportUtils.isUnread(report) && Visibility.hasFocus() && scrollingVerticalOffset.current < MSG_VISIBLE_THRESHOLD) {
Report.readNewestAction(report.reportID);
} else {
Expand All @@ -212,9 +215,6 @@ function ReportActionsList({
}

useEffect(() => {
if (!userActiveSince.current || report.reportID !== prevReportID) {
return;
}

readNewestReportActionOnFocus()

Expand Down

0 comments on commit da88368

Please sign in to comment.