diff options
author | dan <dan.abramov@gmail.com> | 2023-10-13 15:29:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-13 15:29:50 +0100 |
commit | d5ccbd76d5ffc9280f0109138f608b94bee0aadf (patch) | |
tree | 84fd90b0db3e95cc194ce71536c3068d4bc8dd2a | |
parent | eba9f8a1662e78ff79b7d179efa8dec261d61d87 (diff) | |
download | voidsky-d5ccbd76d5ffc9280f0109138f608b94bee0aadf.tar.zst |
Disable events on hidden bars (#1686)
-rw-r--r-- | src/view/com/pager/FeedsTabBarMobile.tsx | 12 | ||||
-rw-r--r-- | src/view/shell/bottom-bar/BottomBar.tsx | 1 | ||||
-rw-r--r-- | src/view/shell/bottom-bar/BottomBarStyles.tsx | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/view/com/pager/FeedsTabBarMobile.tsx b/src/view/com/pager/FeedsTabBarMobile.tsx index 6bdba11a1..7924666e5 100644 --- a/src/view/com/pager/FeedsTabBarMobile.tsx +++ b/src/view/com/pager/FeedsTabBarMobile.tsx @@ -49,7 +49,14 @@ export const FeedsTabBar = observer(function FeedsTabBarImpl( ) return ( - <Animated.View style={[pal.view, pal.border, styles.tabBar, transform]}> + <Animated.View + style={[ + pal.view, + pal.border, + styles.tabBar, + transform, + store.shell.minimalShellMode && styles.disabled, + ]}> <View style={[pal.view, styles.topBar]}> <View style={[pal.view]}> <TouchableOpacity @@ -117,4 +124,7 @@ const styles = StyleSheet.create({ title: { fontSize: 21, }, + disabled: { + pointerEvents: 'none', + }, }) diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index 4758c5e01..984aef25d 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -87,6 +87,7 @@ export const BottomBar = observer(function BottomBarImpl({ pal.border, {paddingBottom: clamp(safeAreaInsets.bottom, 15, 30)}, footerMinimalShellTransform, + store.shell.minimalShellMode && styles.disabled, ]}> <Btn testID="bottomBarHomeBtn" diff --git a/src/view/shell/bottom-bar/BottomBarStyles.tsx b/src/view/shell/bottom-bar/BottomBarStyles.tsx index ae9381440..c175ed848 100644 --- a/src/view/shell/bottom-bar/BottomBarStyles.tsx +++ b/src/view/shell/bottom-bar/BottomBarStyles.tsx @@ -65,4 +65,7 @@ export const styles = StyleSheet.create({ borderWidth: 1, borderRadius: 100, }, + disabled: { + pointerEvents: 'none', + }, }) |