about summary refs log tree commit diff
path: root/src/lib/hooks/useMinimalShellMode.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-10-12 21:02:17 +0100
committerGitHub <noreply@github.com>2023-10-12 21:02:17 +0100
commit997918547c7b9eaeecb0cb65e9360796e6777eb9 (patch)
tree13a50cd4fd5894d33e7cf6c7a5fb086d41d7b8c6 /src/lib/hooks/useMinimalShellMode.tsx
parentc2a1cf4e56780b60fa8d140f9c7c855567851f5c (diff)
downloadvoidsky-997918547c7b9eaeecb0cb65e9360796e6777eb9.tar.zst
Make shell hide/show animation smoother (#1683)
* Make shell hide/show animation smoother

* Also animate "load latest"
Diffstat (limited to 'src/lib/hooks/useMinimalShellMode.tsx')
-rw-r--r--src/lib/hooks/useMinimalShellMode.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/hooks/useMinimalShellMode.tsx b/src/lib/hooks/useMinimalShellMode.tsx
index e28a0e884..2a0a4e4d0 100644
--- a/src/lib/hooks/useMinimalShellMode.tsx
+++ b/src/lib/hooks/useMinimalShellMode.tsx
@@ -7,21 +7,22 @@ export function useMinimalShellMode() {
   const store = useStores()
   const minimalShellInterp = useAnimatedValue(0)
   const footerMinimalShellTransform = {
-    transform: [{translateY: Animated.multiply(minimalShellInterp, 100)}],
+    opacity: Animated.subtract(1, minimalShellInterp),
+    transform: [{translateY: Animated.multiply(minimalShellInterp, 50)}],
   }
 
   React.useEffect(() => {
     if (store.shell.minimalShellMode) {
       Animated.timing(minimalShellInterp, {
         toValue: 1,
-        duration: 100,
+        duration: 150,
         useNativeDriver: true,
         isInteraction: false,
       }).start()
     } else {
       Animated.timing(minimalShellInterp, {
         toValue: 0,
-        duration: 100,
+        duration: 150,
         useNativeDriver: true,
         isInteraction: false,
       }).start()