Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: do not display new line when creating request money. #32177

Merged
merged 9 commits into from
Dec 7, 2023
6 changes: 6 additions & 0 deletions src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ function ReportActionsList({
(reportAction, index) => {
let shouldDisplay = false;
if (!currentUnreadMarker) {
// Check if the report type is "REPORTREVIEW" and last actor is the current user.
// Return shouldDisplay new marker action (terminate flow).
// This is to avoid displaying the new line marker when a current userrequests money.
if (ReportActionsUtils.isReportPreviewAction(reportAction) && reportAction.childLastActorAccountID === Report.getCurrentUserAccountID()) {
return shouldDisplay;
teneeto marked this conversation as resolved.
Show resolved Hide resolved
}
const nextMessage = sortedReportActions[index + 1];
const isCurrentMessageUnread = isMessageUnread(reportAction, lastReadTimeRef.current);
shouldDisplay = isCurrentMessageUnread && (!nextMessage || !isMessageUnread(nextMessage, lastReadTimeRef.current));
Expand Down
Loading