about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-11-05 22:27:36 +0000
committerGitHub <noreply@github.com>2024-11-05 22:27:36 +0000
commit84fb1b7f97af7cdcaac1049d2c843c421d50539a (patch)
treeb4307d6599b3c600a732f41e123de7ab4c78f917 /src
parentb0c5a37daabc04570d33776de6c13be87a795491 (diff)
downloadvoidsky-84fb1b7f97af7cdcaac1049d2c843c421d50539a.tar.zst
Update Reanimated (#6126)
* Update Reanimated

* Fix types

* Fix Reanimated value access warnings

* Fix types
Diffstat (limited to 'src')
-rw-r--r--src/Splash.tsx1
-rw-r--r--src/components/Dialog/index.tsx2
-rw-r--r--src/screens/Messages/components/MessagesList.tsx2
-rw-r--r--src/state/shell/minimal-mode.tsx8
-rw-r--r--src/state/shell/shell-layout.tsx8
-rw-r--r--src/view/com/util/List.web.tsx2
-rw-r--r--src/view/com/util/Views.web.tsx4
7 files changed, 23 insertions, 4 deletions
diff --git a/src/Splash.tsx b/src/Splash.tsx
index 8acf75875..5a2b18445 100644
--- a/src/Splash.tsx
+++ b/src/Splash.tsx
@@ -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)
diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx
index c860c4dcf..0e78fcf97 100644
--- a/src/components/Dialog/index.tsx
+++ b/src/components/Dialog/index.tsx
@@ -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'
diff --git a/src/screens/Messages/components/MessagesList.tsx b/src/screens/Messages/components/MessagesList.tsx
index b659e98d6..f549b8560 100644
--- a/src/screens/Messages/components/MessagesList.tsx
+++ b/src/screens/Messages/components/MessagesList.tsx
@@ -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'
 
diff --git a/src/state/shell/minimal-mode.tsx b/src/state/shell/minimal-mode.tsx
index 9230339dd..3f1cebdf0 100644
--- a/src/state/shell/minimal-mode.tsx
+++ b/src/state/shell/minimal-mode.tsx
@@ -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) => {})
diff --git a/src/state/shell/shell-layout.tsx b/src/state/shell/shell-layout.tsx
index a58ba851c..39f69cfff 100644
--- a/src/state/shell/shell-layout.tsx
+++ b/src/state/shell/shell-layout.tsx
@@ -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() {},
   },
 })
 
diff --git a/src/view/com/util/List.web.tsx b/src/view/com/util/List.web.tsx
index 5f89cfbbc..d35ac1476 100644
--- a/src/view/com/util/List.web.tsx
+++ b/src/view/com/util/List.web.tsx
@@ -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'
diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx
index 272cc9dd5..1f030b408 100644
--- a/src/view/com/util/Views.web.tsx
+++ b/src/view/com/util/Views.web.tsx
@@ -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')