Skip to content

Commit e32a770

Browse files
authored
Merge pull request Expensify#67982 from huult/67845-new-message-button-toggle-when-expense-rhp-opened
[CP Staging] Update condition to prevent scrolling to end when there is a new message
2 parents d416d6c + 9855310 commit e32a770

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/pages/home/report/ReportActionsList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ function ReportActionsList({
398398
return;
399399
}
400400

401-
const shouldScrollToEnd = (isExpenseReport(report) || isTransactionThread(parentReportAction)) && isSearchTopmostFullScreenRoute();
401+
const shouldScrollToEnd =
402+
(isExpenseReport(report) || isTransactionThread(parentReportAction)) && isSearchTopmostFullScreenRoute() && hasNewestReportAction && !unreadMarkerReportActionID;
402403

403404
if (shouldScrollToEnd) {
404405
setShouldScrollToEndAfterLayout(true);

0 commit comments

Comments
 (0)