Skip to content

Commit

Permalink
set readActionSkipped only when report is unread
Browse files Browse the repository at this point in the history
  • Loading branch information
arosiclair committed Dec 15, 2023
1 parent dc3cc66 commit ede3435
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ function ReportActionsList({
return;
}

if (Visibility.isVisible() && ReportUtils.isUnread(report) && scrollingVerticalOffset.current < MSG_VISIBLE_THRESHOLD) {
Report.readNewestAction(report.reportID);
} else {
readActionSkipped.current = true;
if (ReportUtils.isUnread(report)) {
if (Visibility.isVisible() && scrollingVerticalOffset.current < MSG_VISIBLE_THRESHOLD) {
Report.readNewestAction(report.reportID);
} else {
readActionSkipped.current = true;
}
}

if (currentUnreadMarker || lastVisibleActionCreatedRef.current === report.lastVisibleActionCreated) {
Expand Down

0 comments on commit ede3435

Please sign in to comment.