Skip to content

Commit

Permalink
fix: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Jan 20, 2023
1 parent 1236e72 commit 9c616ee
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
5 changes: 5 additions & 0 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import * as User from './libs/actions/User';
import NetworkConnection from './libs/NetworkConnection';
import Navigation from './libs/Navigation/Navigation';
import DeeplinkWrapper from './components/DeeplinkWrapper';
import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu';
import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu';

// This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection
// eslint-disable-next-line no-unused-vars
Expand Down Expand Up @@ -189,6 +191,9 @@ class Expensify extends PureComponent {
{!this.state.isSplashShown && (
<>
<GrowlNotification ref={Growl.growlRef} />
<PopoverReportActionContextMenu
ref={ReportActionContextMenu.contextMenuRef}
/>
{/* We include the modal for showing a new update at the top level so the option is always present. */}
{this.props.updateAvailable ? <UpdateAppModal /> : null}
{this.props.screenShareRequest ? (
Expand Down
47 changes: 20 additions & 27 deletions src/libs/Navigation/AppNavigator/MainDrawerNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import SidebarScreen from '../../../pages/home/sidebar/SidebarScreen';
import BaseDrawerNavigator from './BaseDrawerNavigator';
import * as ReportUtils from '../../ReportUtils';
import reportPropTypes from '../../../pages/reportPropTypes';
import * as ReportActionContextMenu from '../../../pages/home/report/ContextMenu/ReportActionContextMenu';
import PopoverReportActionContextMenu from '../../../pages/home/report/ContextMenu/PopoverReportActionContextMenu';

const propTypes = {
/** Available reports that would be displayed in this navigator */
Expand Down Expand Up @@ -82,31 +80,26 @@ class MainDrawerNavigator extends Component {
// This way routing information is updated (if needed) based on the initial report ID resolved.
// This is usually needed after login/create account and re-launches
return (
<>
<PopoverReportActionContextMenu
ref={ReportActionContextMenu.contextMenuRef}
/>
<BaseDrawerNavigator
drawerContent={({navigation, state}) => {
// This state belongs to the drawer so it should always have the ReportScreen as it's initial (and only) route
const reportIDFromRoute = lodashGet(state, ['routes', 0, 'params', 'reportID']);
return (
<SidebarScreen
navigation={navigation}
reportIDFromRoute={reportIDFromRoute}
/>
);
}}
screens={[
{
name: SCREENS.REPORT,
component: ReportScreen,
initialParams: this.initialParams,
},
]}
isMainScreen
/>
</>
<BaseDrawerNavigator
drawerContent={({navigation, state}) => {
// This state belongs to the drawer so it should always have the ReportScreen as it's initial (and only) route
const reportIDFromRoute = lodashGet(state, ['routes', 0, 'params', 'reportID']);
return (
<SidebarScreen
navigation={navigation}
reportIDFromRoute={reportIDFromRoute}
/>
);
}}
screens={[
{
name: SCREENS.REPORT,
component: ReportScreen,
initialParams: this.initialParams,
},
]}
isMainScreen
/>
);
}
}
Expand Down

0 comments on commit 9c616ee

Please sign in to comment.