@@ -18,6 +18,7 @@ import useDebugShortcut from './hooks/useDebugShortcut';
1818import useIsAuthenticated from './hooks/useIsAuthenticated' ;
1919import useLocalize from './hooks/useLocalize' ;
2020import useOnyx from './hooks/useOnyx' ;
21+ import usePriorityMode from './hooks/usePriorityChange' ;
2122import { updateLastRoute } from './libs/actions/App' ;
2223import { disconnect } from './libs/actions/Delegate' ;
2324import * as EmojiPickerAction from './libs/actions/EmojiPickerAction' ;
@@ -101,8 +102,12 @@ function Expensify() {
101102 const [ isSidebarLoaded ] = useOnyx ( ONYXKEYS . IS_SIDEBAR_LOADED , { canBeMissing : true } ) ;
102103 const [ screenShareRequest ] = useOnyx ( ONYXKEYS . SCREEN_SHARE_REQUEST , { canBeMissing : true } ) ;
103104 const [ lastVisitedPath ] = useOnyx ( ONYXKEYS . LAST_VISITED_PATH , { canBeMissing : true } ) ;
105+ const [ currentOnboardingPurposeSelected ] = useOnyx ( ONYXKEYS . ONBOARDING_PURPOSE_SELECTED , { canBeMissing : true } ) ;
106+ const [ currentOnboardingCompanySize ] = useOnyx ( ONYXKEYS . ONBOARDING_COMPANY_SIZE , { canBeMissing : true } ) ;
107+ const [ onboardingInitialPath ] = useOnyx ( ONYXKEYS . ONBOARDING_LAST_VISITED_PATH , { canBeMissing : true } ) ;
104108
105109 useDebugShortcut ( ) ;
110+ usePriorityMode ( ) ;
106111
107112 const [ initialUrl , setInitialUrl ] = useState < Route | null > ( null ) ;
108113
@@ -204,12 +209,12 @@ function Expensify() {
204209 // If the app is opened from a deep link, get the reportID (if exists) from the deep link and navigate to the chat report
205210 Linking . getInitialURL ( ) . then ( ( url ) => {
206211 setInitialUrl ( url as Route ) ;
207- Report . openReportFromDeepLink ( url ?? '' ) ;
212+ Report . openReportFromDeepLink ( url ?? '' , currentOnboardingPurposeSelected , currentOnboardingCompanySize , onboardingInitialPath ) ;
208213 } ) ;
209214
210215 // Open chat report from a deep link (only mobile native)
211216 Linking . addEventListener ( 'url' , ( state ) => {
212- Report . openReportFromDeepLink ( state . url ) ;
217+ Report . openReportFromDeepLink ( state . url , currentOnboardingPurposeSelected , currentOnboardingCompanySize , onboardingInitialPath ) ;
213218 } ) ;
214219 if ( CONFIG . IS_HYBRID_APP ) {
215220 HybridAppModule . onURLListenerAdded ( ) ;
0 commit comments