Skip to content

Commit

Permalink
Merge pull request #14955 from Expensify/marco-checkRouteParams
Browse files Browse the repository at this point in the history
[CP Staging] Get route.params.openOnAdminRoom if exists
  • Loading branch information
madmax330 authored Feb 8, 2023
2 parents 96a8085 + ccf1e73 commit 05f5c49
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/libs/Navigation/AppNavigator/MainDrawerNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ class MainDrawerNavigator extends Component {
constructor(props) {
super(props);
this.trackAppStartTiming = this.trackAppStartTiming.bind(this);
this.initialParams = getInitialReportScreenParams(props.reports, !Permissions.canUseDefaultRooms(props.betas), props.policies, props.route.params.openOnAdminRoom);
this.initialParams = getInitialReportScreenParams(
props.reports,
!Permissions.canUseDefaultRooms(props.betas),
props.policies,
lodashGet(props, 'route.params.openOnAdminRoom', false),
);

// When we have chat reports the moment this component got created
// we know that the data was served from storage/cache
Expand All @@ -80,7 +85,7 @@ class MainDrawerNavigator extends Component {
nextProps.reports,
!Permissions.canUseDefaultRooms(nextProps.betas),
nextProps.policies,
nextProps.route.params.openOnAdminRoom,
lodashGet(nextProps, 'route.params.openOnAdminRoom', false),
);
if (this.initialParams.reportID === initialNextParams.reportID) {
return false;
Expand Down

0 comments on commit 05f5c49

Please sign in to comment.