diff options
author | dan <dan.abramov@gmail.com> | 2024-11-17 15:06:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-17 15:06:28 +0000 |
commit | 474c4eff29b6a2454a20febf78a1edd5cf58663a (patch) | |
tree | 43a189a8101cf3f5265d967ad46182cf8cbde9a0 /src/state/shell/minimal-mode.tsx | |
parent | d575a2fdaaa4d9c93d6b739dfe3377cdd5985dc1 (diff) | |
download | voidsky-474c4eff29b6a2454a20febf78a1edd5cf58663a.tar.zst |
Use compiler-safe Reanimated get/set APIs (#6391)
* Convert lightbox to get/set * Work around software-mansion/react-native-reanimated#6613 * Use get/set in more places * Port MainScrollProvider to get/set * Port more to get/set * Port composer to get/set * Remove unnecessary thread hops in composer * Port more things to get/set * Convert more to get/set, remove redundant runOnJS * Convert remaining cases to get/set
Diffstat (limited to 'src/state/shell/minimal-mode.tsx')
-rw-r--r-- | src/state/shell/minimal-mode.tsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/state/shell/minimal-mode.tsx b/src/state/shell/minimal-mode.tsx index 3f1cebdf0..00547ee3e 100644 --- a/src/state/shell/minimal-mode.tsx +++ b/src/state/shell/minimal-mode.tsx @@ -44,13 +44,17 @@ export function Provider({children}: React.PropsWithChildren<{}>) { 'worklet' // Cancel any existing animation cancelAnimation(headerMode) - headerMode.value = withSpring(v ? 1 : 0, { - overshootClamping: true, - }) + headerMode.set(() => + withSpring(v ? 1 : 0, { + overshootClamping: true, + }), + ) cancelAnimation(footerMode) - footerMode.value = withSpring(v ? 1 : 0, { - overshootClamping: true, - }) + footerMode.set(() => + withSpring(v ? 1 : 0, { + overshootClamping: true, + }), + ) }, [headerMode, footerMode], ) |