From 115ee41fe9857c593d55d66d1d7c110fd99732b0 Mon Sep 17 00:00:00 2001 From: war-in Date: Fri, 13 Dec 2024 14:26:18 +0100 Subject: [PATCH] improve another method --- src/libs/HybridApp.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libs/HybridApp.ts b/src/libs/HybridApp.ts index 60e6debeec96..85b137bf6d50 100644 --- a/src/libs/HybridApp.ts +++ b/src/libs/HybridApp.ts @@ -70,16 +70,16 @@ function handleChangeInHybridAppSignInFlow(hybridApp: OnyxEntry, tryN if (hybridApp?.newDotSignInState === CONST.HYBRID_APP_SIGN_IN_STATE.FINISHED && tryNewDot !== undefined && !!credentials?.autoGeneratedLogin && !!credentials?.autoGeneratedPassword) { Log.info(`[HybridApp] Performing sign-in${shouldUseOldApp(tryNewDot) ? '' : ' (in background)'} on OldDot side`); - NativeModules.HybridAppModule.signInToOldDot( - credentials.autoGeneratedLogin, - credentials.autoGeneratedPassword, - currentSession?.authToken ?? '', - getCurrentUserEmail() ?? '', - activePolicyID ?? '', - ); + NativeModules.HybridAppModule.signInToOldDot({ + autoGeneratedLogin: credentials.autoGeneratedLogin, + autoGeneratedPassword: credentials.autoGeneratedPassword, + authToken: currentSession?.authToken ?? '', + email: getCurrentUserEmail() ?? '', + policyID: activePolicyID ?? '', + }); HybridAppActions.setUseNewDotSignInPage(false).then(() => { if (shouldUseOldApp(tryNewDot)) { - NativeModules.HybridAppModule.closeReactNativeApp(false, false); + NativeModules.HybridAppModule.closeReactNativeApp({shouldSignOut: false, shouldSetNVP: false}); } else { Log.info('[HybridApp] The user should see NewDot. There is no need to block the user on the `SignInPage` until the sign-in process is completed on the OldDot side.'); HybridAppActions.setReadyToShowAuthScreens(true);