@@ -103,6 +103,7 @@ function Expensify() {
103103 const [ lastVisitedPath ] = useOnyx ( ONYXKEYS . LAST_VISITED_PATH , { canBeMissing : true } ) ;
104104 const [ currentOnboardingPurposeSelected ] = useOnyx ( ONYXKEYS . ONBOARDING_PURPOSE_SELECTED , { canBeMissing : true } ) ;
105105 const [ currentOnboardingCompanySize ] = useOnyx ( ONYXKEYS . ONBOARDING_COMPANY_SIZE , { canBeMissing : true } ) ;
106+ const [ onboardingInitialPath ] = useOnyx ( ONYXKEYS . ONBOARDING_LAST_VISITED_PATH , { canBeMissing : true } ) ;
106107
107108 useDebugShortcut ( ) ;
108109
@@ -206,12 +207,12 @@ function Expensify() {
206207 // If the app is opened from a deep link, get the reportID (if exists) from the deep link and navigate to the chat report
207208 Linking . getInitialURL ( ) . then ( ( url ) => {
208209 setInitialUrl ( url as Route ) ;
209- Report . openReportFromDeepLink ( url ?? '' , currentOnboardingPurposeSelected , currentOnboardingCompanySize ) ;
210+ Report . openReportFromDeepLink ( url ?? '' , currentOnboardingPurposeSelected , currentOnboardingCompanySize , onboardingInitialPath ) ;
210211 } ) ;
211212
212213 // Open chat report from a deep link (only mobile native)
213214 Linking . addEventListener ( 'url' , ( state ) => {
214- Report . openReportFromDeepLink ( state . url , currentOnboardingPurposeSelected , currentOnboardingCompanySize ) ;
215+ Report . openReportFromDeepLink ( state . url , currentOnboardingPurposeSelected , currentOnboardingCompanySize , onboardingInitialPath ) ;
215216 } ) ;
216217 if ( CONFIG . IS_HYBRID_APP ) {
217218 HybridAppModule . onURLListenerAdded ( ) ;
0 commit comments