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

Always call OpenReport when deeplinking within the app #15897

Merged
merged 5 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import styles from '../../../styles/styles';
import Navigation from '../../../libs/Navigation/Navigation';
import AnchorForCommentsOnly from '../../AnchorForCommentsOnly';
import AnchorForAttachmentsOnly from '../../AnchorForAttachmentsOnly';
import * as Report from '../../../libs/actions/Report';
import * as Url from '../../../libs/Url';
import ROUTES from '../../../ROUTES';

Expand Down Expand Up @@ -47,6 +48,8 @@ const AnchorRenderer = (props) => {
// If we are handling a New Expensify link then we will assume this should be opened by the app internally. This ensures that the links are opened internally via react-navigation
// instead of in a new tab or with a page refresh (which is the default behavior of an anchor tag)
if (internalNewExpensifyPath) {
const reportID = attrPath.split('r/').pop();
jasperhuangg marked this conversation as resolved.
Show resolved Hide resolved
Report.openReport(reportID);
Navigation.navigate(internalNewExpensifyPath);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class ReportScreen extends React.Component {
)}
>
<FullPageNotFoundView
shouldShow={!this.props.report.reportID}
shouldShow={!this.props.report.reportID && !this.props.report.isLoadingReportActions}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This prevents the No Access screen from showing while the OpenApp call is loading

subtitleKey="notFound.noAccess"
shouldShowCloseButton={false}
shouldShowBackButton={this.props.isSmallScreenWidth}
Expand Down