diff --git a/patches/react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch b/patches/react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch index 62cbf68f458d..52f8d76c4fe1 100644 --- a/patches/react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch +++ b/patches/react-native-screens+3.34.0+004+ios-custom-animations-native-transitions.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm -index abb2cf6..fb81d52 100644 +index abb2cf6..c21b3e9 100644 --- a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm +++ b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm @@ -5,13 +5,14 @@ @@ -32,7 +32,7 @@ index abb2cf6..fb81d52 100644 } @@ -129,6 +130,8 @@ - (void)animateSimplePushWithShadowEnabled:(BOOL)shadowEnabled } - + [UIView animateWithDuration:[self transitionDuration:transitionContext] + delay:0 + options:UIViewAnimationOptionCurveDefaultTransition @@ -66,25 +66,7 @@ index abb2cf6..fb81d52 100644 animations:animationBlock completion:completionBlock]; } else { -@@ -251,6 +260,8 @@ - (void)animateFadeWithTransitionContext:(id; replaceAnimation?: WithDefault; swipeDirection?: WithDefault; - hideKeyboardOnSwipe?: boolean; \ No newline at end of file + hideKeyboardOnSwipe?: boolean; diff --git a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx index 62cceee9f400..b4b71549f7ec 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx @@ -2,6 +2,7 @@ import {useNavigationState} from '@react-navigation/native'; import React from 'react'; import createCustomBottomTabNavigator from '@libs/Navigation/AppNavigator/createCustomBottomTabNavigator'; import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute'; +import Animations from '@libs/Navigation/PlatformStackNavigation/navigationOptions/animation'; import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {BottomTabNavigatorParamList, CentralPaneName, NavigationPartialRoute, RootStackParamList} from '@libs/Navigation/types'; import SidebarScreen from '@pages/home/sidebar/SidebarScreen'; @@ -14,6 +15,7 @@ const loadInitialSettingsPage = () => require('../../../.. const Tab = createCustomBottomTabNavigator(); const screenOptions: PlatformStackNavigationOptions = { + animation: Animations.FADE, headerShown: false, }; diff --git a/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/fade/index.ts b/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/fade/index.ts new file mode 100644 index 000000000000..84783d36cab4 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/fade/index.ts @@ -0,0 +1,7 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import type {PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import Animations from '..'; + +const fade: PlatformSpecificNavigationOptions = {animation: Animations.FADE, animationDuration: 150} satisfies NativeStackNavigationOptions; + +export default fade; diff --git a/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/index.ts b/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/index.ts index 17796333cdda..c64b564c308b 100644 --- a/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/index.ts @@ -5,12 +5,14 @@ const InternalPlatformAnimations = { IOS_FROM_LEFT: 'ios_from_left', IOS_FROM_RIGHT: 'ios_from_right', SIMPLE_PUSH: 'simple_push', + FADE: 'fade', } as const; const Animations = { SLIDE_FROM_LEFT: 'slide_from_left', SLIDE_FROM_RIGHT: 'slide_from_right', MODAL: 'modal', + FADE: 'fade', NONE: 'none', } as const; diff --git a/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/withAnimation.ts b/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/withAnimation.ts index 9fafa1f14bad..ae0ab962123d 100644 --- a/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/withAnimation.ts +++ b/src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/withAnimation.ts @@ -1,6 +1,7 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationOptions} from '@react-navigation/stack'; import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import fade from './fade'; import Animations from './index'; import none from './none'; import slideFromBottom from './slideFromBottom'; @@ -19,6 +20,8 @@ function withAnimation