From 2c2d12b3949dfbb26e8fadecfe9dfecfe3f6962d Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Tue, 26 Nov 2024 23:56:57 +0000
Subject: Fix stutter when swiping feeds on Android (#6765)

---
 src/state/shell/minimal-mode.tsx | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

(limited to 'src/state/shell/minimal-mode.tsx')

diff --git a/src/state/shell/minimal-mode.tsx b/src/state/shell/minimal-mode.tsx
index 00547ee3e..eba3aa2b0 100644
--- a/src/state/shell/minimal-mode.tsx
+++ b/src/state/shell/minimal-mode.tsx
@@ -1,10 +1,5 @@
 import React from 'react'
-import {
-  cancelAnimation,
-  SharedValue,
-  useSharedValue,
-  withSpring,
-} from 'react-native-reanimated'
+import {SharedValue, useSharedValue, withSpring} from 'react-native-reanimated'
 
 type StateContext = {
   headerMode: SharedValue<number>
@@ -42,14 +37,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
   const setMode = React.useCallback(
     (v: boolean) => {
       'worklet'
-      // Cancel any existing animation
-      cancelAnimation(headerMode)
       headerMode.set(() =>
         withSpring(v ? 1 : 0, {
           overshootClamping: true,
         }),
       )
-      cancelAnimation(footerMode)
       footerMode.set(() =>
         withSpring(v ? 1 : 0, {
           overshootClamping: true,
-- 
cgit 1.4.1

