about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-10-13 15:29:50 +0100
committerGitHub <noreply@github.com>2023-10-13 15:29:50 +0100
commitd5ccbd76d5ffc9280f0109138f608b94bee0aadf (patch)
tree84fd90b0db3e95cc194ce71536c3068d4bc8dd2a /src
parenteba9f8a1662e78ff79b7d179efa8dec261d61d87 (diff)
downloadvoidsky-d5ccbd76d5ffc9280f0109138f608b94bee0aadf.tar.zst
Disable events on hidden bars (#1686)
Diffstat (limited to 'src')
-rw-r--r--src/view/com/pager/FeedsTabBarMobile.tsx12
-rw-r--r--src/view/shell/bottom-bar/BottomBar.tsx1
-rw-r--r--src/view/shell/bottom-bar/BottomBarStyles.tsx3
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',
+  },
 })