From 614066c11e52b418d2ce28600088b3ae3be9e455 Mon Sep 17 00:00:00 2001 From: Lei Nelissen Date: Wed, 29 Jan 2025 11:25:00 +0100 Subject: [PATCH] fix: missing fallback cover images --- src/components/CoverImage.tsx | 2 ++ src/screens/Downloads/index.tsx | 4 ++-- src/screens/Music/overlays/NowPlaying/index.tsx | 4 ++-- src/screens/Search/stacks/Search/index.tsx | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/CoverImage.tsx b/src/components/CoverImage.tsx index a71deac..b40d42c 100644 --- a/src/components/CoverImage.tsx +++ b/src/components/CoverImage.tsx @@ -59,6 +59,8 @@ function CoverImage({ return { imageSize, canvasSize }; }, [blurRadius, margin]); + console.log({ src }); + return ( diff --git a/src/screens/Downloads/index.tsx b/src/screens/Downloads/index.tsx index efa918e..0575104 100644 --- a/src/screens/Downloads/index.tsx +++ b/src/screens/Downloads/index.tsx @@ -11,11 +11,11 @@ import Button from '@/components/Button'; import DownloadIcon from '@/components/DownloadIcon'; import styled from 'styled-components/native'; import { Text } from '@/components/Typography'; -import FastImage from 'react-native-fast-image'; import { useGetImage } from '@/utility/JellyfinApi/lib'; import { ShadowWrapper } from '@/components/Shadow'; import { SafeFlatList } from '@/components/SafeNavigatorView'; import { t } from '@/localisation'; +import BaseAlbumImage from '../Music/stacks/components/AlbumImage'; const DownloadedTrack = styled.View` flex: 1 0 auto; @@ -25,7 +25,7 @@ const DownloadedTrack = styled.View` margin: 0 20px; `; -const AlbumImage = styled(FastImage)` +const AlbumImage = styled(BaseAlbumImage)` height: 32px; width: 32px; border-radius: 4px; diff --git a/src/screens/Music/overlays/NowPlaying/index.tsx b/src/screens/Music/overlays/NowPlaying/index.tsx index 9a0f37a..c101b7b 100644 --- a/src/screens/Music/overlays/NowPlaying/index.tsx +++ b/src/screens/Music/overlays/NowPlaying/index.tsx @@ -1,6 +1,5 @@ import React, { useCallback, useContext, useEffect, useRef } from 'react'; import { ActivityIndicator, Animated, Dimensions, Platform, Pressable, View } from 'react-native'; -import FastImage from 'react-native-fast-image'; import styled, { css } from 'styled-components/native'; import PlayIcon from '@/assets/icons/play.svg'; @@ -18,6 +17,7 @@ import { NavigationProp } from '@/screens/types'; import { ShadowWrapper } from '@/components/Shadow'; import { BottomTabBarHeightContext } from '@react-navigation/bottom-tabs'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import AlbumImage from '../../stacks/components/AlbumImage'; export const NOW_PLAYING_POPOVER_MARGIN = 6; export const NOW_PLAYING_POPOVER_WIDTH = Dimensions.get('screen').width - 2 * NOW_PLAYING_POPOVER_MARGIN; @@ -62,7 +62,7 @@ const ShadowOverlay = styled.View` bottom: 0; `; -const Cover = styled(FastImage)` +const Cover = styled(AlbumImage)` height: 32px; width: 32px; border-radius: 4px; diff --git a/src/screens/Search/stacks/Search/index.tsx b/src/screens/Search/stacks/Search/index.tsx index 7f364fd..8fa397b 100644 --- a/src/screens/Search/stacks/Search/index.tsx +++ b/src/screens/Search/stacks/Search/index.tsx @@ -9,7 +9,6 @@ import { FlatList } from 'react-native-gesture-handler'; import TouchableHandler from '@/components/TouchableHandler'; import { useNavigation } from '@react-navigation/native'; import { useGetImage } from '@/utility/JellyfinApi/lib'; -import FastImage from 'react-native-fast-image'; import { t } from '@/localisation'; import useDefaultStyles, { ColoredBlurView } from '@/components/Colors'; import { searchAndFetchAlbums } from '@/store/music/actions'; @@ -22,6 +21,7 @@ import { ShadowWrapper } from '@/components/Shadow'; import { useKeyboardHeight } from '@/utility/useKeyboardHeight'; import { NavigationProp } from '@/screens/types'; import { useNavigationOffsets } from '@/components/SafeNavigatorView'; +import BaseAlbumImage from '@/screens/Music/stacks/components/AlbumImage'; // import MicrophoneIcon from '@/assets/icons/microphone.svg'; // import AlbumIcon from '@/assets/icons/collection.svg'; // import TrackIcon from '@/assets/icons/note.svg'; @@ -52,7 +52,7 @@ const Loading = styled.View` justify-content: center; `; -const AlbumImage = styled(FastImage)` +const AlbumImage = styled(BaseAlbumImage)` border-radius: 4px; width: 32px; height: 32px;