From 01a93f0566525267f2ccb2a21c0e6ac3da1c881a Mon Sep 17 00:00:00 2001 From: war-in Date: Mon, 2 Sep 2024 16:33:42 +0200 Subject: [PATCH] opened -> visible --- src/CONST.ts | 2 +- src/Expensify.tsx | 2 +- src/SplashScreenStateContext.tsx | 4 ++-- src/components/HybridAppMiddleware/index.ios.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index a418f5d48f58..689c4906f25a 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -5489,7 +5489,7 @@ const CONST = { }, BOOT_SPLASH_STATE: { - OPENED: 1, + VISIBLE: 1, READY_TO_BE_HIDDEN: 2, HIDDEN: 3, }, diff --git a/src/Expensify.tsx b/src/Expensify.tsx index 656447247f07..19e4bfa85af1 100644 --- a/src/Expensify.tsx +++ b/src/Expensify.tsx @@ -123,7 +123,7 @@ function Expensify({ const shouldInit = isNavigationReady && hasAttemptedToOpenPublicRoom; const shouldHideSplash = shouldInit && - (NativeModules.HybridAppModule ? splashScreenState === CONST.BOOT_SPLASH_STATE.READY_TO_BE_HIDDEN && isAuthenticated : splashScreenState === CONST.BOOT_SPLASH_STATE.OPENED); + (NativeModules.HybridAppModule ? splashScreenState === CONST.BOOT_SPLASH_STATE.READY_TO_BE_HIDDEN && isAuthenticated : splashScreenState === CONST.BOOT_SPLASH_STATE.VISIBLE); const initializeClient = () => { if (!Visibility.isVisible()) { diff --git a/src/SplashScreenStateContext.tsx b/src/SplashScreenStateContext.tsx index 14b349e1b8bc..90a858f70c42 100644 --- a/src/SplashScreenStateContext.tsx +++ b/src/SplashScreenStateContext.tsx @@ -9,12 +9,12 @@ type SplashScreenStateContextType = { }; const SplashScreenStateContext = React.createContext({ - splashScreenState: CONST.BOOT_SPLASH_STATE.OPENED, + splashScreenState: CONST.BOOT_SPLASH_STATE.VISIBLE, setSplashScreenState: () => {}, }); function SplashScreenStateContextProvider({children}: ChildrenProps) { - const [splashScreenState, setSplashScreenState] = useState>(CONST.BOOT_SPLASH_STATE.OPENED); + const [splashScreenState, setSplashScreenState] = useState>(CONST.BOOT_SPLASH_STATE.VISIBLE); const splashScreenStateContext = useMemo( () => ({ splashScreenState, diff --git a/src/components/HybridAppMiddleware/index.ios.tsx b/src/components/HybridAppMiddleware/index.ios.tsx index abcb0f2dca6d..0fb61fb9ad7a 100644 --- a/src/components/HybridAppMiddleware/index.ios.tsx +++ b/src/components/HybridAppMiddleware/index.ios.tsx @@ -63,7 +63,7 @@ function HybridAppMiddleware({children}: HybridAppMiddlewareProps) { const HybridAppEvents = new NativeEventEmitter(NativeModules.HybridAppModule as unknown as NativeModule); const listener = HybridAppEvents.addListener(CONST.EVENTS.ON_RETURN_TO_OLD_DOT, () => { Log.info('[HybridApp] `onReturnToOldDot` event received. Resetting state of HybridAppMiddleware', true); - setSplashScreenState(CONST.BOOT_SPLASH_STATE.OPENED); + setSplashScreenState(CONST.BOOT_SPLASH_STATE.VISIBLE); }); return () => {