minor ui fixes

This commit is contained in:
tapframe 2025-09-03 16:00:30 +05:30
parent e3b86bcc90
commit 8adbfc5a85
2 changed files with 18 additions and 3 deletions

View file

@ -994,7 +994,7 @@ const InnerNavigator = ({ initialRouteName }: { initialRouteName?: keyof RootSta
name="HomeScreenSettings"
component={HomeScreenSettings}
options={{
animation: Platform.OS === 'android' ? 'slide_from_right' : 'fade',
animation: Platform.OS === 'android' ? 'slide_from_right' : 'default',
animationDuration: Platform.OS === 'android' ? 250 : 200,
presentation: 'card',
gestureEnabled: true,
@ -1009,7 +1009,7 @@ const InnerNavigator = ({ initialRouteName }: { initialRouteName?: keyof RootSta
name="HeroCatalogs"
component={HeroCatalogsScreen}
options={{
animation: Platform.OS === 'android' ? 'slide_from_right' : 'fade',
animation: Platform.OS === 'android' ? 'slide_from_right' : 'default',
animationDuration: Platform.OS === 'android' ? 250 : 200,
presentation: 'card',
gestureEnabled: true,

View file

@ -14,7 +14,7 @@ import {
Dimensions
} from 'react-native';
import { useSettings } from '../hooks/useSettings';
import { useNavigation } from '@react-navigation/native';
import { useNavigation, useFocusEffect } from '@react-navigation/native';
import { NavigationProp } from '@react-navigation/native';
import { MaterialIcons } from '@expo/vector-icons';
import { useTheme } from '../contexts/ThemeContext';
@ -116,6 +116,21 @@ const HomeScreenSettings: React.FC = () => {
const [showSavedIndicator, setShowSavedIndicator] = useState(false);
const fadeAnim = React.useRef(new Animated.Value(0)).current;
// Prevent iOS entrance flicker by restoring a non-translucent StatusBar
useFocusEffect(
React.useCallback(() => {
try {
StatusBar.setTranslucent(false);
StatusBar.setBackgroundColor(isDarkMode ? colors.darkBackground : '#F2F2F7');
StatusBar.setBarStyle(isDarkMode ? 'light-content' : 'dark-content');
if (Platform.OS === 'ios') {
StatusBar.setHidden(false);
}
} catch {}
return () => {};
}, [isDarkMode, colors.darkBackground])
);
const handleBack = useCallback(() => {
navigation.goBack();
}, [navigation]);