From 2c32e775df47d7d7c3023c3763d3961efa5266d8 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 28 May 2025 16:24:09 +0300 Subject: [PATCH] simplify screen options, use default animation duration --- src/Navigation.tsx | 61 ++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 374c80f4fb..238247d202 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -103,7 +103,7 @@ import { import {Wizard} from '#/screens/StarterPack/Wizard' import TopicScreen from '#/screens/Topic' import {VideoFeed} from '#/screens/VideoFeed' -import {useTheme} from '#/alf' +import {type Theme, useTheme} from '#/alf' import { EmailDialogScreenID, useEmailDialogControl, @@ -515,19 +515,20 @@ function TabsNavigator() { ) } +function screenOptions(t: Theme) { + return { + fullScreenGestureEnabled: true, + fullScreenGestureShadowEnabled: true, + headerShown: false, + contentStyle: t.atoms.bg, + } +} + function HomeTabNavigator() { const t = useTheme() return ( - + HomeScreen} /> HomeScreen} /> {commonScreens(HomeTab as typeof Flat)} @@ -539,13 +540,7 @@ function SearchTabNavigator() { const t = useTheme() return ( SearchScreen} /> {commonScreens(SearchTab as typeof Flat)} @@ -557,13 +552,7 @@ function NotificationsTabNavigator() { const t = useTheme() return ( { return ( + screenOptions={screenOptions(t)}> HomeScreen}