diff --git a/packages/mobile/src/screens/root-screen/RootScreen.tsx b/packages/mobile/src/screens/root-screen/RootScreen.tsx index d71358960c6..d5f1e0603e0 100644 --- a/packages/mobile/src/screens/root-screen/RootScreen.tsx +++ b/packages/mobile/src/screens/root-screen/RootScreen.tsx @@ -1,6 +1,6 @@ import { useCallback, useEffect, useState } from 'react' -import { Status } from '@audius/common/models' +import { MobileOS, Status } from '@audius/common/models' import { FeatureFlags } from '@audius/common/services' import { accountSelectors, @@ -13,6 +13,7 @@ import { getStartedSignUpProcess, getWelcomeModalShown } from 'common/store/pages/signon/selectors' +import { Platform } from 'react-native' import { useDispatch, useSelector } from 'react-redux' import useAppState from 'app/hooks/useAppState' @@ -63,6 +64,7 @@ export const RootScreen = () => { const showHomeStack = useSelector(getHasCompletedAccount) const startedSignUp = useSelector(getStartedSignUpProcess) const welcomeModalShown = useSelector(getWelcomeModalShown) + const isAndroid = Platform.OS === MobileOS.ANDROID const [isLoaded, setIsLoaded] = useState(false) const [isSplashScreenDismissed, setIsSplashScreenDismissed] = useState(false) @@ -154,7 +156,7 @@ export const RootScreen = () => { name='HomeStack' component={AppDrawerScreen} // animation: none here is a workaround to prevent "white screen of death" on Android - options={{ animation: 'none' }} + options={isAndroid ? { animation: 'none' } : undefined} /> ) : isSignUpRedesignEnabled ? ( diff --git a/packages/mobile/src/screens/sign-on-screen/SignOnStack.tsx b/packages/mobile/src/screens/sign-on-screen/SignOnStack.tsx index 8cf81af7249..84ced399723 100644 --- a/packages/mobile/src/screens/sign-on-screen/SignOnStack.tsx +++ b/packages/mobile/src/screens/sign-on-screen/SignOnStack.tsx @@ -1,9 +1,11 @@ import { useCallback, useState } from 'react' +import { MobileOS } from '@audius/common/models' import { accountSelectors } from '@audius/common/store' import type { NativeStackNavigationOptions } from '@react-navigation/native-stack' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { getSignOn } from 'audius-client/src/common/store/pages/signon/selectors' +import { Platform } from 'react-native' import { useSelector } from 'react-redux' import { ScreenOptionsContext, defaultScreenOptions } from 'app/app/navigation' @@ -41,6 +43,8 @@ export const SignOnStack = (props: SignOnStackProps) => { const pastPhase1 = signUpState.finishedPhase1 || hasAccount + const isAndroid = Platform.OS === MobileOS.ANDROID + const updateOptions = useCallback( (newOptions: NativeStackNavigationOptions) => { setScreenOptions({ @@ -87,14 +91,21 @@ export const SignOnStack = (props: SignOnStackProps) => { null, gestureEnabled: false }} + options={{ + headerLeft: () => null, + gestureEnabled: false, + ...(isAndroid ? { animation: 'none' } : undefined) + }} />