diff --git a/app/(app)/feed/detail/[entryId].tsx b/app/(app)/feed/detail/[entryId].tsx index 8196305..7a48126 100644 --- a/app/(app)/feed/detail/[entryId].tsx +++ b/app/(app)/feed/detail/[entryId].tsx @@ -11,9 +11,9 @@ import { FlatList, Pressable, View } from 'react-native' import ContextMenu from 'react-native-context-menu-view' import PagerView from 'react-native-pager-view' import Animated, { FadeIn, runOnJS, SlideInDown, SlideOutDown, useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated' -import { toast } from 'react-native-reanimated-toasts' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { createStyleSheet, UnistylesRuntime, useStyles } from 'react-native-unistyles' +import { toast } from 'sonner-native' import useSWR from 'swr' import { apiClient } from '~/api/client' diff --git a/app/_layout.tsx b/app/_layout.tsx index 55d75e7..caf03a3 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -10,11 +10,11 @@ import { Slot } from 'expo-router' import * as SplashScreen from 'expo-splash-screen' import { useEffect } from 'react' import type { AppStateStatus } from 'react-native' -import { AppState } from 'react-native' +import { AppState, LogBox } from 'react-native' import { GestureHandlerRootView } from 'react-native-gesture-handler' import { createModalStack, ModalProvider } from 'react-native-modalfy' -import { Toaster } from 'react-native-reanimated-toasts' import { SafeAreaView } from 'react-native-safe-area-context' +import { Toaster } from 'sonner-native' import { SWRConfig } from 'swr' import { Text } from '~/components' @@ -23,6 +23,11 @@ import { db, expoDb } from '~/db' import migrations from '~/drizzle/migrations' import { useNavigationTheme, useTheme } from '~/hooks/use-theme' +// TODO: Remove this once toast doesn't throw a warning. +LogBox.ignoreLogs([ + /^\[react-native-gesture-handler\]/, +]) + export const unstable_settings = { // Ensure that reloading on `/settings` keeps a back button present. initialRouteName: '(app)', @@ -119,7 +124,7 @@ export default function Root() { - + diff --git a/components/entry-list.tsx b/components/entry-list.tsx index 868e44a..5e1c7ee 100644 --- a/components/entry-list.tsx +++ b/components/entry-list.tsx @@ -13,9 +13,9 @@ import type { SwipeableMethods } from 'react-native-gesture-handler/ReanimatedSw import ReanimatedSwipeable from 'react-native-gesture-handler/ReanimatedSwipeable' import type { SharedValue } from 'react-native-reanimated' import Reanimated, { useAnimatedStyle } from 'react-native-reanimated' -import { toast } from 'react-native-reanimated-toasts' import TrackPlayer, { usePlaybackState } from 'react-native-track-player' import { createStyleSheet, useStyles } from 'react-native-unistyles' +import { toast } from 'sonner-native' import { unstable_serialize } from 'swr' import { checkNotExistEntries, flagEntryReadStatus } from '~/api/entry'