Skip to content

Commit

Permalink
Merge pull request #27270 from tienifr/fix/26824
Browse files Browse the repository at this point in the history
fix: 26824 Unread messages get marked as read without me visiting the chats
  • Loading branch information
cristipaval authored Sep 14, 2023
2 parents 954c66d + 5742ddb commit a2db0c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,10 @@ function ReportScreen({

useEffect(() => {
const unsubscribeVisibilityListener = Visibility.onVisibilityChange(() => {
const isTopMostReportID = Navigation.getTopmostReportId() === getReportID(route);
// If the report is not fully visible (AKA on small screen devices and LHR is open) or the report is optimistic (AKA not yet created)
// we don't need to call openReport
if (!getIsReportFullyVisible(isTopMostReportId) || report.isOptimisticReport) {
if (!getIsReportFullyVisible(isTopMostReportID) || report.isOptimisticReport) {
return;
}

Expand Down

0 comments on commit a2db0c3

Please sign in to comment.