about summary refs log tree commit diff
path: root/src/view/com/util/MainScrollProvider.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/util/MainScrollProvider.tsx')
-rw-r--r--src/view/com/util/MainScrollProvider.tsx19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/view/com/util/MainScrollProvider.tsx b/src/view/com/util/MainScrollProvider.tsx
index 3163d8544..c87ee209e 100644
--- a/src/view/com/util/MainScrollProvider.tsx
+++ b/src/view/com/util/MainScrollProvider.tsx
@@ -9,7 +9,6 @@ import {
 import EventEmitter from 'eventemitter3'
 
 import {ScrollProvider} from '#/lib/ScrollContext'
-import {useGate} from '#/lib/statsig/statsig'
 import {useMinimalShellMode} from '#/state/shell'
 import {useShellLayout} from '#/state/shell/shell-layout'
 import {isNative, isWeb} from 'platform/detection'
@@ -23,12 +22,10 @@ function clamp(num: number, min: number, max: number) {
 
 export function MainScrollProvider({children}: {children: React.ReactNode}) {
   const {headerHeight} = useShellLayout()
-  const {headerMode, footerMode} = useMinimalShellMode()
+  const {headerMode} = useMinimalShellMode()
   const startDragOffset = useSharedValue<number | null>(null)
   const startMode = useSharedValue<number | null>(null)
   const didJustRestoreScroll = useSharedValue<boolean>(false)
-  const gate = useGate()
-  const isFixedBottomBar = gate('fixed_bottom_bar')
 
   const setMode = React.useCallback(
     (v: boolean) => {
@@ -37,14 +34,8 @@ export function MainScrollProvider({children}: {children: React.ReactNode}) {
       headerMode.value = withSpring(v ? 1 : 0, {
         overshootClamping: true,
       })
-      if (!isFixedBottomBar) {
-        cancelAnimation(footerMode)
-        footerMode.value = withSpring(v ? 1 : 0, {
-          overshootClamping: true,
-        })
-      }
     },
-    [headerMode, footerMode, isFixedBottomBar],
+    [headerMode],
   )
 
   useEffect(() => {
@@ -147,10 +138,6 @@ export function MainScrollProvider({children}: {children: React.ReactNode}) {
           // Cancel any any existing animation
           cancelAnimation(headerMode)
           headerMode.value = newValue
-          if (!isFixedBottomBar) {
-            cancelAnimation(footerMode)
-            footerMode.value = newValue
-          }
         }
       } else {
         if (didJustRestoreScroll.value) {
@@ -173,12 +160,10 @@ export function MainScrollProvider({children}: {children: React.ReactNode}) {
     [
       headerHeight,
       headerMode,
-      footerMode,
       setMode,
       startDragOffset,
       startMode,
       didJustRestoreScroll,
-      isFixedBottomBar,
     ],
   )