diff --git a/app/(auth)/(tabs)/(home)/index.tsx b/app/(auth)/(tabs)/(home)/index.tsx index 9aecff51..364cf52c 100644 --- a/app/(auth)/(tabs)/(home)/index.tsx +++ b/app/(auth)/(tabs)/(home)/index.tsx @@ -25,11 +25,10 @@ import { import NetInfo from "@react-native-community/netinfo"; import { QueryFunction, useQuery, useQueryClient } from "@tanstack/react-query"; import { useNavigation, useRouter } from "expo-router"; -import { useAtom, useAtomValue } from "jotai"; +import { useAtomValue } from "jotai"; import { useCallback, useEffect, useMemo, useState } from "react"; import { ActivityIndicator, - Platform, RefreshControl, ScrollView, TouchableOpacity, diff --git a/app/(auth)/(tabs)/(libraries)/[libraryId].tsx b/app/(auth)/(tabs)/(libraries)/[libraryId].tsx index 1f345a0a..563759c1 100644 --- a/app/(auth)/(tabs)/(libraries)/[libraryId].tsx +++ b/app/(auth)/(tabs)/(libraries)/[libraryId].tsx @@ -1,12 +1,8 @@ import { useInfiniteQuery, useQuery } from "@tanstack/react-query"; -import { - useFocusEffect, - useLocalSearchParams, - useNavigation, -} from "expo-router"; +import { useLocalSearchParams, useNavigation } from "expo-router"; import * as ScreenOrientation from "expo-screen-orientation"; import { useAtom } from "jotai"; -import React, { useCallback, useEffect, useLayoutEffect, useMemo } from "react"; +import React, { useCallback, useEffect, useMemo } from "react"; import { FlatList, useWindowDimensions, View } from "react-native"; import { Text } from "@/components/common/Text"; @@ -16,6 +12,7 @@ import { ResetFiltersButton } from "@/components/filters/ResetFiltersButton"; import { ItemCardText } from "@/components/ItemCardText"; import { Loader } from "@/components/Loader"; import { ItemPoster } from "@/components/posters/ItemPoster"; +import { useOrientation } from "@/hooks/useOrientation"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { genreFilterAtom, @@ -43,7 +40,6 @@ import { } from "@jellyfin/sdk/lib/utils/api"; import { FlashList } from "@shopify/flash-list"; import { useSafeAreaInsets } from "react-native-safe-area-context"; -import { useOrientation } from "@/hooks/useOrientation"; const MemoizedTouchableItemRouter = React.memo(TouchableItemRouter); diff --git a/app/(auth)/play-offline-video.tsx b/app/(auth)/play-offline-video.tsx index 54b52fcd..b4310d31 100644 --- a/app/(auth)/play-offline-video.tsx +++ b/app/(auth)/play-offline-video.tsx @@ -8,25 +8,13 @@ import { PlaybackType, usePlaySettings, } from "@/providers/PlaySettingsProvider"; -import { useSettings } from "@/utils/atoms/settings"; -import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl"; -import orientationToOrientationLock from "@/utils/OrientationLockConverter"; import { secondsToTicks } from "@/utils/secondsToTicks"; import { Api } from "@jellyfin/sdk"; import * as Haptics from "expo-haptics"; -import * as NavigationBar from "expo-navigation-bar"; import { useFocusEffect } from "expo-router"; -import * as ScreenOrientation from "expo-screen-orientation"; import { useAtomValue } from "jotai"; -import React, { - useCallback, - useEffect, - useLayoutEffect, - useMemo, - useRef, - useState, -} from "react"; -import { Dimensions, Platform, Pressable, StatusBar, View } from "react-native"; +import React, { useCallback, useMemo, useRef, useState } from "react"; +import { Pressable, StatusBar, View } from "react-native"; import { useSharedValue } from "react-native-reanimated"; import Video, { OnProgressData, VideoRef } from "react-native-video"; diff --git a/app/(auth)/play-video.tsx b/app/(auth)/play-video.tsx index cce91dcc..2d4960bd 100644 --- a/app/(auth)/play-video.tsx +++ b/app/(auth)/play-video.tsx @@ -18,14 +18,8 @@ import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api"; import * as Haptics from "expo-haptics"; import { useFocusEffect } from "expo-router"; import { useAtomValue } from "jotai"; -import React, { - useCallback, - useEffect, - useMemo, - useRef, - useState, -} from "react"; -import { Dimensions, Pressable, StatusBar, View } from "react-native"; +import React, { useCallback, useMemo, useRef, useState } from "react"; +import { Pressable, StatusBar, View } from "react-native"; import { useSharedValue } from "react-native-reanimated"; import Video, { OnProgressData, diff --git a/components/library/LibraryItemCard.tsx b/components/library/LibraryItemCard.tsx index 51a05846..0a19d1a9 100644 --- a/components/library/LibraryItemCard.tsx +++ b/components/library/LibraryItemCard.tsx @@ -11,12 +11,9 @@ import { getItemsApi } from "@jellyfin/sdk/lib/utils/api"; import { useQuery } from "@tanstack/react-query"; import { Image } from "expo-image"; import { useAtom } from "jotai"; -import { useEffect, useMemo, useState } from "react"; +import { useMemo } from "react"; import { TouchableOpacityProps, View } from "react-native"; -import { getColors } from "react-native-image-colors"; import { TouchableItemRouter } from "../common/TouchableItemRouter"; -import { useImageColors } from "@/hooks/useImageColors"; -import { itemThemeColorAtom } from "@/utils/atoms/primaryColor"; interface Props extends TouchableOpacityProps { library: BaseItemDto; @@ -53,10 +50,6 @@ export const LibraryItemCard: React.FC = ({ library, ...props }) => { [library] ); - // If we want to use image colors for library cards - // const [color] = useAtom(itemThemeColorAtom) - // useImageColors({ url }); - const { data: itemsCount } = useQuery({ queryKey: ["library-count", library.Id], queryFn: async () => {