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

Use goBack so that the < works for threads and other chats #18350

Merged
merged 3 commits into from
May 11, 2023
Merged
Changes from 2 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
6 changes: 2 additions & 4 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ class ReportScreen extends React.Component {
subtitleKey="notFound.noAccess"
shouldShowCloseButton={false}
shouldShowBackButton={this.props.isSmallScreenWidth}
onBackButtonPress={() => {
Navigation.navigate(ROUTES.HOME);
}}
onBackButtonPress={Navigation.goBack}
>
{isLoading ? (
<ReportHeaderSkeletonView shouldAnimate={shouldAnimate} />
Expand All @@ -293,7 +291,7 @@ class ReportScreen extends React.Component {
) : (
<HeaderView
reportID={reportID}
onNavigationMenuButtonClicked={() => Navigation.navigate(ROUTES.HOME)}
onNavigationMenuButtonClicked={Navigation.goBack}
Comment on lines -296 to +294
Copy link
Contributor

@s77rt s77rt Jul 8, 2023

Choose a reason for hiding this comment

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

This caused a regression #20370. After viewing many reports (that are not threaded nor linked to each other i.e. any random reports from LHN) then we click the < button on the last report (and only on the last report), we will navigate back to the previous report instead of LHN. This is kinda an edge case I think.

personalDetails={this.props.personalDetails}
report={this.props.report}
/>
Expand Down