Disable page-transition animations on android (#2352)

zio/stable
Paul Frazee 2023-12-28 15:46:50 -08:00 committed by GitHub
parent 0d960c58ba
commit 2a369e7e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,7 @@ import {BottomBar} from './view/shell/bottom-bar/BottomBar'
import {buildStateObject} from 'lib/routes/helpers' import {buildStateObject} from 'lib/routes/helpers'
import {State, RouteParams} from 'lib/routes/types' import {State, RouteParams} from 'lib/routes/types'
import {colors} from 'lib/styles' import {colors} from 'lib/styles'
import {isNative} from 'platform/detection' import {isAndroid, isNative} from 'platform/detection'
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
import {router} from './routes' import {router} from './routes'
import {usePalette} from 'lib/hooks/usePalette' import {usePalette} from 'lib/hooks/usePalette'
@ -286,6 +286,7 @@ function HomeTabNavigator() {
return ( return (
<HomeTab.Navigator <HomeTab.Navigator
screenOptions={{ screenOptions={{
animation: isAndroid ? 'none' : undefined,
gestureEnabled: true, gestureEnabled: true,
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
headerShown: false, headerShown: false,
@ -307,6 +308,7 @@ function SearchTabNavigator() {
return ( return (
<SearchTab.Navigator <SearchTab.Navigator
screenOptions={{ screenOptions={{
animation: isAndroid ? 'none' : undefined,
gestureEnabled: true, gestureEnabled: true,
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
headerShown: false, headerShown: false,
@ -324,6 +326,7 @@ function FeedsTabNavigator() {
return ( return (
<FeedsTab.Navigator <FeedsTab.Navigator
screenOptions={{ screenOptions={{
animation: isAndroid ? 'none' : undefined,
gestureEnabled: true, gestureEnabled: true,
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
headerShown: false, headerShown: false,
@ -345,6 +348,7 @@ function NotificationsTabNavigator() {
return ( return (
<NotificationsTab.Navigator <NotificationsTab.Navigator
screenOptions={{ screenOptions={{
animation: isAndroid ? 'none' : undefined,
gestureEnabled: true, gestureEnabled: true,
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
headerShown: false, headerShown: false,
@ -366,6 +370,7 @@ function MyProfileTabNavigator() {
return ( return (
<MyProfileTab.Navigator <MyProfileTab.Navigator
screenOptions={{ screenOptions={{
animation: isAndroid ? 'none' : undefined,
gestureEnabled: true, gestureEnabled: true,
fullScreenGestureEnabled: true, fullScreenGestureEnabled: true,
headerShown: false, headerShown: false,