diff --git a/app.json b/app.json index fca9a35..61ac1aa 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "CheckOut", "slug": "CheckOut", - "version": "1.2.7", + "version": "1.2.8", "orientation": "portrait", "icon": "./assets/images/icon.png", "scheme": "checkoutattendance", diff --git a/components/TabScreenScrollView.tsx b/components/TabScreenScrollView.tsx index d18e399..c02816a 100644 --- a/components/TabScreenScrollView.tsx +++ b/components/TabScreenScrollView.tsx @@ -1,7 +1,6 @@ -import { useRef, useCallback, useContext, forwardRef, useImperativeHandle } from 'react'; -import { ScrollView, ScrollViewProps, Platform } from 'react-native'; +import { useRef, useContext, forwardRef, useImperativeHandle } from 'react'; +import { ScrollView, ScrollViewProps } from 'react-native'; import { BottomTabBarHeightContext } from '@react-navigation/bottom-tabs'; -import { useFocusEffect } from '@react-navigation/native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import Constants from 'expo-constants'; import { useConnectionContext } from '@/contexts/ConnectionContext'; @@ -27,6 +26,8 @@ const TOP_BAR_HEIGHT = 60; const CONNECTION_BANNER_HEIGHT = 52; // VersionUpdateBanner height: padding (14*2) + content height (~24) ≈ 56px const VERSION_BANNER_HEIGHT = 56; +// Extra breathing room so content doesn't sit flush against the tab bar +const BOTTOM_EXTRA_PADDING = 16; export const TabScreenScrollView = forwardRef( function TabScreenScrollView({ children, contentContainerStyle, ...props }, ref) { @@ -37,7 +38,6 @@ export const TabScreenScrollView = forwardRef { - if (Platform.OS === 'ios') { - // Small delay to ensure layout is complete - const timeout = setTimeout(() => { - scrollViewRef.current?.scrollTo({ y: 0, animated: false }); - }, 0); - return () => clearTimeout(timeout); - } - }, []) - ); - return (