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
This commit is contained in:
@@ -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],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user