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
(cherry picked from commit a2db0c3)
  • Loading branch information
cristipaval authored and OSBotify committed Sep 15, 2023
1 parent 1fa8c43 commit 5aff643
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 5aff643

Please sign in to comment.