Update Reanimated (#6126)

* Update Reanimated

* Fix types

* Fix Reanimated value access warnings

* Fix types
This commit is contained in:
dan
2024-11-05 22:27:36 +00:00
committed by GitHub
parent b0c5a37daa
commit 84fb1b7f97
10 changed files with 292 additions and 218 deletions
+1
View File
@@ -56,6 +56,7 @@ type Props = {
const AnimatedLogo = Animated.createAnimatedComponent(Logo)
export function Splash(props: React.PropsWithChildren<Props>) {
'use no memo'
const insets = useSafeAreaInsets()
const intro = useSharedValue(0)
const outroLogo = useSharedValue(0)
+1 -1
View File
@@ -15,7 +15,7 @@ import {
useKeyboardHandler,
} from 'react-native-keyboard-controller'
import {runOnJS} from 'react-native-reanimated'
import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/reanimated2/hook/commonTypes'
import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
@@ -11,7 +11,7 @@ import {
useAnimatedStyle,
useSharedValue,
} from 'react-native-reanimated'
import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/reanimated2/hook/commonTypes'
import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {AppBskyEmbedRecord, AppBskyRichtextFacet, RichText} from '@atproto/api'
+8
View File
@@ -18,12 +18,20 @@ const stateContext = React.createContext<StateContext>({
addListener() {},
removeListener() {},
modify() {},
get() {
return 0
},
set() {},
},
footerMode: {
value: 0,
addListener() {},
removeListener() {},
modify() {},
get() {
return 0
},
set() {},
},
})
const setContext = React.createContext<SetContext>((_: boolean) => {})
+8
View File
@@ -12,12 +12,20 @@ const stateContext = React.createContext<StateContext>({
addListener() {},
removeListener() {},
modify() {},
get() {
return 0
},
set() {},
},
footerHeight: {
value: 0,
addListener() {},
removeListener() {},
modify() {},
get() {
return 0
},
set() {},
},
})
+1 -1
View File
@@ -1,6 +1,6 @@
import React, {isValidElement, memo, startTransition, useRef} from 'react'
import {FlatListProps, StyleSheet, View, ViewProps} from 'react-native'
import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/reanimated2/hook/commonTypes'
import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes'
import {batchedUpdates} from '#/lib/batchedUpdates'
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
+3 -1
View File
@@ -70,7 +70,9 @@ export const FlatList_INTERNAL = React.forwardRef(function FlatListImpl<ItemT>(
contentOffset,
desktopFixedHeight,
...props
}: React.PropsWithChildren<FlatListProps<ItemT> & AddedProps>,
}: React.PropsWithChildren<
Omit<FlatListProps<ItemT>, 'CellRendererComponent'> & AddedProps
>,
ref: React.Ref<FlatList<ItemT>>,
) {
const pal = usePalette('default')