Skip to content

Commit

Permalink
opened -> visible
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Sep 2, 2024
1 parent 320de61 commit 01a93f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5489,7 +5489,7 @@ const CONST = {
},

BOOT_SPLASH_STATE: {
OPENED: 1,
VISIBLE: 1,
READY_TO_BE_HIDDEN: 2,
HIDDEN: 3,
},
Expand Down
2 changes: 1 addition & 1 deletion src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
4 changes: 2 additions & 2 deletions src/SplashScreenStateContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ type SplashScreenStateContextType = {
};

const SplashScreenStateContext = React.createContext<SplashScreenStateContextType>({
splashScreenState: CONST.BOOT_SPLASH_STATE.OPENED,
splashScreenState: CONST.BOOT_SPLASH_STATE.VISIBLE,
setSplashScreenState: () => {},
});

function SplashScreenStateContextProvider({children}: ChildrenProps) {
const [splashScreenState, setSplashScreenState] = useState<ValueOf<typeof CONST.BOOT_SPLASH_STATE>>(CONST.BOOT_SPLASH_STATE.OPENED);
const [splashScreenState, setSplashScreenState] = useState<ValueOf<typeof CONST.BOOT_SPLASH_STATE>>(CONST.BOOT_SPLASH_STATE.VISIBLE);
const splashScreenStateContext = useMemo(
() => ({
splashScreenState,
Expand Down
2 changes: 1 addition & 1 deletion src/components/HybridAppMiddleware/index.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 01a93f0

Please sign in to comment.