Skip to content

Commit

Permalink
Merge pull request Expensify#50433 from callstack-internal/fix/47584
Browse files Browse the repository at this point in the history
Fix/47584
  • Loading branch information
thienlnam authored Oct 10, 2024
2 parents 4a6efd1 + 650ef52 commit d7f3c5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function ReportActionsView({
selector: (reportActions: OnyxEntry<OnyxTypes.ReportActions>) => ReportActionsUtils.getSortedReportActionsForDisplay(reportActions, true),
});
const [transactionThreadReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID ?? -1}`);
const prevTransactionThreadReport = usePrevious(transactionThreadReport);
const reportActionID = route?.params?.reportActionID;
const prevReportActionID = usePrevious(reportActionID);
const didLayout = useRef(false);
Expand Down Expand Up @@ -470,7 +471,7 @@ function ReportActionsView({
}

// AutoScroll is disabled when we do linking to a specific reportAction
const shouldEnableAutoScroll = hasNewestReportAction && (!reportActionID || !isNavigatingToLinkedMessage);
const shouldEnableAutoScroll = (hasNewestReportAction && (!reportActionID || !isNavigatingToLinkedMessage)) || (transactionThreadReport && !prevTransactionThreadReport);
return (
<>
<ReportActionsList
Expand Down

0 comments on commit d7f3c5c

Please sign in to comment.