From 7d7431d14e52d94cce51941013c8a5fe5665adb1 Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Sat, 7 Sep 2024 17:07:30 +0200
Subject: Set fixed_bottom_bar to true (#5203)

---
 src/view/com/util/MainScrollProvider.tsx | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

(limited to 'src/view/com/util/MainScrollProvider.tsx')

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,
     ],
   )
 
-- 
cgit 1.4.1

