Skip to content

Commit

Permalink
Merge pull request #30712 from Expensify/revert-29860-27456-green-line
Browse files Browse the repository at this point in the history
[CP Staging] Revert "27456 Chat - The green line is displayed chaotically at the recipient"

(cherry picked from commit e108378)
  • Loading branch information
Beamanator authored and OSBotify committed Nov 1, 2023
1 parent 047b3e7 commit ce504bc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,9 @@ function ReportActionsList({
if (!currentUnreadMarker) {
const nextMessage = sortedReportActions[index + 1];
const isCurrentMessageUnread = isMessageUnread(reportAction, report.lastReadTime);
const isNextMessageRead = !isMessageUnread(nextMessage, report.lastReadTime);
const isWithinVisibleThreshold = scrollingVerticalOffset.current < MSG_VISIBLE_THRESHOLD ? reportAction.created < userActiveSince.current : true;
shouldDisplay = isCurrentMessageUnread && (!nextMessage || isNextMessageRead) && isWithinVisibleThreshold;

if (shouldDisplay && !messageManuallyMarkedUnread) {
shouldDisplay = reportAction.actorAccountID !== Report.getCurrentUserAccountID();
shouldDisplay = isCurrentMessageUnread && (!nextMessage || !isMessageUnread(nextMessage, report.lastReadTime));
if (!messageManuallyMarkedUnread) {
shouldDisplay = shouldDisplay && reportAction.actorAccountID !== Report.getCurrentUserAccountID();
}
} else {
shouldDisplay = reportAction.reportActionID === currentUnreadMarker;
Expand Down

0 comments on commit ce504bc

Please sign in to comment.