diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 689945da099e..819e8ac29ffe 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -294,16 +294,13 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie setDidPusherInit(true); }); - // In Hybrid App we decide to call one of those method when booting ND and we don't want to duplicate calls - if (!NativeModules.HybridAppModule) { - // If we are on this screen then we are "logged in", but the user might not have "just logged in". They could be reopening the app - // or returning from background. If so, we'll assume they have some app data already and we can call reconnectApp() instead of openApp(). - if (SessionUtils.didUserLogInDuringSession()) { - App.openApp(); - } else { - Log.info('[AuthScreens] Sending ReconnectApp'); - App.reconnectApp(initialLastUpdateIDAppliedToClient); - } + // If we are on this screen then we are "logged in", but the user might not have "just logged in". They could be reopening the app + // or returning from background. If so, we'll assume they have some app data already and we can call reconnectApp() instead of openApp(). + if (SessionUtils.didUserLogInDuringSession()) { + App.openApp(); + } else { + Log.info('[AuthScreens] Sending ReconnectApp'); + App.reconnectApp(initialLastUpdateIDAppliedToClient); } PriorityMode.autoSwitchToFocusMode(); diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index ea106f8c9dda..80ff373d3d72 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -489,15 +489,6 @@ function signUpUser() { API.write(WRITE_COMMANDS.SIGN_UP_USER, params, {optimisticData, successData, failureData}); } -function getLastUpdateIDAppliedToClient(): Promise { - return new Promise((resolve) => { - Onyx.connect({ - key: ONYXKEYS.ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT, - callback: (value) => resolve(value ?? 0), - }); - }); -} - function signInAfterTransitionFromOldDot(route: Route, hybridAppSettings: string) { const parsedHybridAppSettings = parseHybridAppSettings(hybridAppSettings); const {initialOnyxValues} = parsedHybridAppSettings; @@ -517,12 +508,8 @@ function signInAfterTransitionFromOldDot(route: Route, hybridAppSettings: string if (hybridApp.useNewDotSignInPage) { setNewDotSignInState(CONST.HYBRID_APP_SIGN_IN_STATE.NOT_STARTED); setOldDotSignInState(CONST.HYBRID_APP_SIGN_IN_STATE.NOT_STARTED); - return Promise.resolve(); } - - return getLastUpdateIDAppliedToClient().then((lastUpdateId) => { - return App.reconnectApp(lastUpdateId); - }); + return Promise.resolve(); }; return new Promise((resolve) => {