Skip to content

fix the "New Messages" badge is displayed out of screen borders #60194

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 32 additions & 30 deletions src/components/MoneyRequestReportView/MoneyRequestReportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,38 @@ function MoneyRequestReportView({report, policy, reportMetadata, shouldDisplayRe
Navigation.goBack(backToRoute);
}}
/>
{shouldUseSingleTransactionView ? (
// This component originally lives in ReportScreen, it is used here to handle the case when the report has a single transaction. Any other case will be handled by MoneyRequestReportActionsList
<ReportActionsView
report={report}
reportActions={reportActions}
isLoadingInitialReportActions={reportMetadata?.isLoadingInitialReportActions}
hasNewerActions={hasNewerActions}
hasOlderActions={hasOlderActions}
parentReportAction={parentReportAction}
transactionThreadReportID={transactionThreadReportID}
/>
) : (
<MoneyRequestReportActionsList
report={report}
transactions={transactions}
reportActions={reportActions}
hasOlderActions={hasOlderActions}
hasNewerActions={hasNewerActions}
/>
)}
{shouldDisplayReportFooter ? (
<ReportFooter
report={report}
reportMetadata={reportMetadata}
policy={policy}
pendingAction={reportPendingAction}
isComposerFullSize={!!isComposerFullSize}
lastReportAction={lastReportAction}
/>
) : null}
<View style={[styles.overflowHidden, styles.flex1]}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SzymczakJ As your fix, the RCA is the badge displayed in the wrong position, but I wonder why it appears in this case

Copy link
Contributor Author

@SzymczakJ SzymczakJ Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's possible to get into state, when "New message" button shows up. One way to do that would be to create a report with one transaction and then write under it from another account. Then the new messages pop up and the first account gets "new messages" button

{shouldUseSingleTransactionView ? (
// This component originally lives in ReportScreen, it is used here to handle the case when the report has a single transaction. Any other case will be handled by MoneyRequestReportActionsList
<ReportActionsView
report={report}
reportActions={reportActions}
isLoadingInitialReportActions={reportMetadata?.isLoadingInitialReportActions}
hasNewerActions={hasNewerActions}
hasOlderActions={hasOlderActions}
parentReportAction={parentReportAction}
transactionThreadReportID={transactionThreadReportID}
/>
) : (
<MoneyRequestReportActionsList
report={report}
transactions={transactions}
reportActions={reportActions}
hasOlderActions={hasOlderActions}
hasNewerActions={hasNewerActions}
/>
)}
{shouldDisplayReportFooter ? (
<ReportFooter
report={report}
reportMetadata={reportMetadata}
policy={policy}
pendingAction={reportPendingAction}
isComposerFullSize={!!isComposerFullSize}
lastReportAction={lastReportAction}
/>
) : null}
</View>
</OfflineWithFeedback>
</View>
);
Expand Down
Loading