From 58d5cb47b7e4aefb62650fa112dc6271afa82ffb Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 17 Nov 2022 10:24:40 -0600 Subject: [PATCH] Avoid overlap against phone header when tabs selector is open --- src/view/shell/mobile/index.tsx | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index 25e572dd..3067f397 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -8,12 +8,14 @@ import { StyleSheet, Text, TouchableOpacity, + useColorScheme, View, ViewStyle, } from 'react-native' import {ScreenContainer, Screen} from 'react-native-screens' import LinearGradient from 'react-native-linear-gradient' import {GestureDetector, Gesture} from 'react-native-gesture-handler' +import {useSafeAreaInsets} from 'react-native-safe-area-context' import Animated, { useSharedValue, useAnimatedStyle, @@ -142,6 +144,8 @@ export const MobileShell: React.FC = observer(() => { const winDim = useWindowDimensions() const swipeGestureInterp = useSharedValue(0) const tabMenuInterp = useSharedValue(0) + const colorScheme = useColorScheme() + const safeAreaInsets = useSafeAreaInsets() const screenRenderDesc = constructScreenRenderDesc(store.nav) const onPressHome = () => { @@ -274,6 +278,15 @@ export const MobileShell: React.FC = observer(() => { + {isTabsSelectorActive ? ( + + ) : undefined}