Skip to content

Commit

Permalink
fix: missing fallback cover images
Browse files Browse the repository at this point in the history
  • Loading branch information
leinelissen committed Jan 29, 2025
1 parent b381537 commit 614066c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/components/CoverImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ function CoverImage({
return { imageSize, canvasSize };
}, [blurRadius, margin]);

console.log({ src });

return (
<Container size={imageSize} style={style}>
<BlurContainer size={canvasSize} offset={blurRadius}>
Expand Down
4 changes: 2 additions & 2 deletions src/screens/Downloads/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/screens/Music/overlays/NowPlaying/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/screens/Search/stacks/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 614066c

Please sign in to comment.