From 9d4186d26a215f356137499458ddea66996cc025 Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Wed, 4 Dec 2024 17:35:17 +0100 Subject: [PATCH] Change concat to push --- src/libs/actions/Session/index.ts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index 1267715a3203..fb13f891a0ba 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -441,6 +441,15 @@ function hybridAppSignInAttemptState(): OnyxData { newDotSignInState: CONST.HYBRID_APP_SIGN_IN_STATE.FINISHED, }, }, + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.NVP_TRYNEWDOT, // Temporary mock to make development easier. Remove when backend is ready. + value: { + classicRedirect: { + dismissed: true, + }, + }, + }, ], failureData: [ { @@ -574,11 +583,12 @@ function beginAppleSignIn(idToken: string | undefined | null) { const {optimisticData, successData, failureData} = signInAttemptState(); if (NativeModules.HybridAppModule) { + Log.info('[HybridApp] Extending `signInAttemptState` with HybridApp data'); const {optimisticData: hybridAppOptimisticData, successData: hybridAppSuccessData, failureData: hybridAppFailureData} = hybridAppSignInAttemptState(); - optimisticData.concat(hybridAppOptimisticData); - successData.concat(hybridAppSuccessData); - failureData.concat(hybridAppFailureData); + optimisticData.push(...hybridAppOptimisticData); + successData.push(...hybridAppSuccessData); + failureData.push(...hybridAppFailureData); } const params: BeginAppleSignInParams = {idToken, preferredLocale}; @@ -594,11 +604,12 @@ function beginGoogleSignIn(token: string | null) { const {optimisticData, successData, failureData} = signInAttemptState(); if (NativeModules.HybridAppModule) { + Log.info('[HybridApp] Extending `signInAttemptState` with HybridApp data'); const {optimisticData: hybridAppOptimisticData, successData: hybridAppSuccessData, failureData: hybridAppFailureData} = hybridAppSignInAttemptState(); - optimisticData.concat(hybridAppOptimisticData); - successData.concat(hybridAppSuccessData); - failureData.concat(hybridAppFailureData); + optimisticData.push(...hybridAppOptimisticData); + successData.push(...hybridAppSuccessData); + failureData.push(...hybridAppFailureData); } const params: BeginGoogleSignInParams = {token, preferredLocale};