Skip to content

Commit

Permalink
Merge pull request #55340 from bernhardoj/fix/50659-system-msg-not-sh…
Browse files Browse the repository at this point in the history
…own-after-edit-money-request

Fix auto scroll doesn't work when editing money request
  • Loading branch information
stitesExpensify authored Jan 20, 2025
2 parents 75f09ac + 7abbdbe commit 3ade089
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ function ReportActionsView({

const newestReportAction = useMemo(() => reportActions?.at(0), [reportActions]);
const mostRecentIOUReportActionID = useMemo(() => getMostRecentIOURequestActionID(reportActions), [reportActions]);
const hasNewestReportAction =
visibleReportActions.at(0)?.created === report.lastVisibleActionCreated || visibleReportActions.at(0)?.created === transactionThreadReport?.lastVisibleActionCreated;
const lastActionCreated = visibleReportActions.at(0)?.created;
const isNewestAction = (actionCreated: string | undefined, lastVisibleActionCreated: string | undefined) =>
actionCreated && lastVisibleActionCreated ? actionCreated >= lastVisibleActionCreated : actionCreated === lastVisibleActionCreated;
const hasNewestReportAction = isNewestAction(lastActionCreated, report.lastVisibleActionCreated) || isNewestAction(lastActionCreated, transactionThreadReport?.lastVisibleActionCreated);
const oldestReportAction = useMemo(() => reportActions?.at(-1), [reportActions]);

useEffect(() => {
Expand Down

0 comments on commit 3ade089

Please sign in to comment.