Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"react-native-permissions": "5.4.2",
"react-native-reanimated": "4.2.2",
"react-native-render-html": "6.3.4",
"react-native-safe-area-context": "5.5.2",
"react-native-safe-area-context": "5.7.0",
"react-native-screens": "4.16.0",
"react-native-vector-icons": "10.3.0",
"react-native-webview": "13.16.0",
Expand Down
7 changes: 5 additions & 2 deletions src/components/Tabbar/CustomTabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import type { BottomTabBarProps } from '@react-navigation/bottom-tabs';
import { Animated, StyleSheet } from 'react-native';
import TabIcon from './TabIcon';
import { useTheme } from 'react-native-paper';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

export const TAB_BAR_HEIGHT = 60;
export const TAB_BAR_HEIGHT = 55;

function CustomTabBar(
props: BottomTabBarProps & {
Expand All @@ -40,12 +41,15 @@ function CustomTabBar(
) {
const state = props.state;
const theme = useTheme();
const safeAreaInsets = useSafeAreaInsets();

return (
<Animated.View
style={{
...styles.bar,
backgroundColor: theme.colors.surface,
paddingBottom: safeAreaInsets.bottom,
height: TAB_BAR_HEIGHT + safeAreaInsets.bottom,
}}
>
{state.routes.map(
Expand Down Expand Up @@ -79,7 +83,6 @@ const styles = StyleSheet.create({
bar: {
flexDirection: 'row',
width: '100%',
height: TAB_BAR_HEIGHT,
position: 'absolute',
bottom: 0,
left: 0,
Expand Down
4 changes: 3 additions & 1 deletion src/navigation/TabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
GeneralPreferenceKeys,
} from '../utils/asyncStorage';
import { ParsedUrlDataType } from '../utils/URLHandler';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

const styles = StyleSheet.create({
header: {
Expand Down Expand Up @@ -103,6 +104,7 @@ const ICONS: {
};

function TabNavigator(props: PropsType) {
const safeAreaInsets = useSafeAreaInsets();
const { preferences } = usePreferences();
let defaultRoute = getPreferenceString(
GeneralPreferenceKeys.defaultStartScreen,
Expand Down Expand Up @@ -133,7 +135,7 @@ function TabNavigator(props: PropsType) {
backBehavior={'initialRoute'}
screenOptions={{
sceneStyle: {
paddingBottom: TAB_BAR_HEIGHT,
paddingBottom: TAB_BAR_HEIGHT + safeAreaInsets.bottom,
},
}}
>
Expand Down
Loading