chore: upgrade all dependencies
This commit is contained in:
@@ -6,10 +6,8 @@ import { useAppDispatch, useTypedSelector } from '@/store';
|
||||
import formatBytes from '@/utility/formatBytes';
|
||||
import TrashIcon from '@/assets/icons/trash.svg';
|
||||
import ArrowClockwise from '@/assets/icons/arrow-clockwise.svg';
|
||||
import { EntityId } from '@reduxjs/toolkit';
|
||||
import { queueTrackForDownload, removeDownloadedTrack } from '@/store/downloads/actions';
|
||||
import Button from '@/components/Button';
|
||||
import { t } from 'i18n-js';
|
||||
import DownloadIcon from '@/components/DownloadIcon';
|
||||
import styled from 'styled-components/native';
|
||||
import { Text } from '@/components/Typography';
|
||||
@@ -18,6 +16,7 @@ import { useGetImage } from '@/utility/JellyfinApi';
|
||||
import { ShadowWrapper } from '@/components/Shadow';
|
||||
import { SafeFlatList } from '@/components/SafeNavigatorView';
|
||||
import { THEME_COLOR } from '@/CONSTANTS';
|
||||
import { t } from '@/localisation';
|
||||
|
||||
const DownloadedTrack = styled.View`
|
||||
flex: 1 0 auto;
|
||||
@@ -55,7 +54,7 @@ function Downloads() {
|
||||
*/
|
||||
|
||||
// Delete a single downloaded track
|
||||
const handleDelete = useCallback((id: EntityId) => {
|
||||
const handleDelete = useCallback((id: string) => {
|
||||
dispatch(removeDownloadedTrack(id));
|
||||
}, [dispatch]);
|
||||
|
||||
@@ -63,7 +62,7 @@ function Downloads() {
|
||||
const handleDeleteAllTracks = useCallback(() => ids.forEach(handleDelete), [handleDelete, ids]);
|
||||
|
||||
// Retry a single failed track
|
||||
const retryTrack = useCallback((id: EntityId) => {
|
||||
const retryTrack = useCallback((id: string) => {
|
||||
dispatch(queueTrackForDownload(id));
|
||||
}, [dispatch]);
|
||||
|
||||
@@ -110,7 +109,7 @@ function Downloads() {
|
||||
</View>
|
||||
), [totalDownloadSize, defaultStyles, failedIds.length, handleRetryFailed, handleDeleteAllTracks, ids.length]);
|
||||
|
||||
const renderItem = useCallback<NonNullable<FlatListProps<EntityId>['renderItem']>>(({ item }) => (
|
||||
const renderItem = useCallback<NonNullable<FlatListProps<string>['renderItem']>>(({ item }) => (
|
||||
<>
|
||||
<DownloadedTrack>
|
||||
<View style={{ marginRight: 12 }}>
|
||||
|
||||
@@ -10,7 +10,6 @@ import TouchableHandler from '@/components/TouchableHandler';
|
||||
import AlbumImage, { AlbumHeight, AlbumItem } from './components/AlbumImage';
|
||||
import { selectAlbumsByAlphabet, SectionedId } from '@/store/music/selectors';
|
||||
import AlphabetScroller from '@/components/AlphabetScroller';
|
||||
import { EntityId } from '@reduxjs/toolkit';
|
||||
import styled from 'styled-components/native';
|
||||
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||
import { Album } from '@/store/music/types';
|
||||
@@ -90,7 +89,7 @@ const Albums: React.FC = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const navigation = useNavigation<NavigationProp>();
|
||||
const getImage = useGetImage();
|
||||
const listRef = useRef<SectionList<EntityId[]>>(null);
|
||||
const listRef = useRef<SectionList<string[]>>(null);
|
||||
|
||||
// Create an array that computes all the height data for the entire list in
|
||||
// advance. We can then use this pre-computed data to respond to
|
||||
@@ -143,7 +142,7 @@ const Albums: React.FC = () => {
|
||||
const selectLetter = useCallback((sectionIndex: number) => {
|
||||
listRef.current?.scrollToLocation({ sectionIndex, itemIndex: 0, animated: false, });
|
||||
}, [listRef]);
|
||||
const generateItem = useCallback(({ item }: { item: EntityId[] }) => {
|
||||
const generateItem = useCallback(({ item }: { item: string[] }) => {
|
||||
return (
|
||||
<View style={{ flexDirection: 'row', marginLeft: 10, marginRight: 10 }} key={item.join('-')}>
|
||||
{item.map((id) => (
|
||||
|
||||
@@ -8,7 +8,6 @@ import { fetchAllAlbums } from '@/store/music/actions';
|
||||
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||
import TouchableHandler from '@/components/TouchableHandler';
|
||||
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
||||
import { EntityId } from '@reduxjs/toolkit';
|
||||
import styled from 'styled-components/native';
|
||||
import useDefaultStyles from '@/components/Colors';
|
||||
import { Album } from '@/store/music/types';
|
||||
@@ -62,7 +61,7 @@ const Artist: React.FC = () => {
|
||||
// Set callbacks
|
||||
const retrieveData = useCallback(() => dispatch(fetchAllAlbums()), [dispatch]);
|
||||
const selectAlbum = useCallback((id: string) => navigation.navigate('Album', { id, album: albums[id] as Album }), [navigation, albums]);
|
||||
const generateItem = useCallback(({ item }: { item: EntityId[] }) => {
|
||||
const generateItem = useCallback(({ item }: { item: string[] }) => {
|
||||
return (
|
||||
<View style={{ flexDirection: 'row', marginLeft: 10, marginRight: 10 }} key={item.join('-')}>
|
||||
{item.map((id) => (
|
||||
|
||||
@@ -8,7 +8,6 @@ import { fetchAllPlaylists } from '@/store/music/actions';
|
||||
import { PLAYLIST_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||
import TouchableHandler from '@/components/TouchableHandler';
|
||||
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
||||
import { EntityId } from '@reduxjs/toolkit';
|
||||
import useDefaultStyles from '@/components/Colors';
|
||||
import { NavigationProp } from '@/screens/types';
|
||||
import { SafeFlatList, useNavigationOffsets } from '@/components/SafeNavigatorView';
|
||||
@@ -46,9 +45,9 @@ const Playlists: React.FC = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const navigation = useNavigation<NavigationProp>();
|
||||
const getImage = useGetImage();
|
||||
const listRef = useRef<FlatList<EntityId>>(null);
|
||||
const listRef = useRef<FlatList<string>>(null);
|
||||
|
||||
const getItemLayout = useCallback((data: ArrayLike<EntityId> | null | undefined, index: number): { offset: number, length: number, index: number } => {
|
||||
const getItemLayout = useCallback((data: ArrayLike<string> | null | undefined, index: number): { offset: number, length: number, index: number } => {
|
||||
const length = 220;
|
||||
const offset = length * index;
|
||||
return { index, length, offset };
|
||||
@@ -59,7 +58,7 @@ const Playlists: React.FC = () => {
|
||||
const selectAlbum = useCallback((id: string) => {
|
||||
navigation.navigate('Playlist', { id });
|
||||
}, [navigation]);
|
||||
const generateItem: ListRenderItem<EntityId> = useCallback(({ item, index }) => {
|
||||
const generateItem: ListRenderItem<string> = useCallback(({ item, index }) => {
|
||||
if (index % 2 === 1) {
|
||||
return <View key={item} />;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import Play from '@/assets/icons/play.svg';
|
||||
import Shuffle from '@/assets/icons/shuffle.svg';
|
||||
import useDefaultStyles from '@/components/Colors';
|
||||
import usePlayTracks from '@/utility/usePlayTracks';
|
||||
import { EntityId } from '@reduxjs/toolkit';
|
||||
import { WrappableButtonRow, WrappableButton } from '@/components/WrappableButtonRow';
|
||||
import { NavigationProp } from '@/screens/types';
|
||||
import DownloadIcon from '@/components/DownloadIcon';
|
||||
@@ -63,7 +62,7 @@ const TrackContainer = styled.View<{ isPlaying: boolean, small?: boolean }>`
|
||||
export interface TrackListViewProps extends PropsWithChildren<{}> {
|
||||
title?: string;
|
||||
artist?: string;
|
||||
trackIds: EntityId[];
|
||||
trackIds: string[];
|
||||
entityId: string;
|
||||
refresh: () => void;
|
||||
playButtonText: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import Input from '@/components/Input';
|
||||
import { ActivityIndicator, Animated, SafeAreaView, View } from 'react-native';
|
||||
import styled from 'styled-components/native';
|
||||
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||
import Fuse from 'fuse.js';
|
||||
import Fuse, { IFuseOptions } from 'fuse.js';
|
||||
import { Album, AlbumTrack } from '@/store/music/types';
|
||||
import { FlatList } from 'react-native-gesture-handler';
|
||||
import TouchableHandler from '@/components/TouchableHandler';
|
||||
@@ -73,7 +73,7 @@ const SearchResult = styled.View`
|
||||
height: 54px;
|
||||
`;
|
||||
|
||||
const fuseOptions: Fuse.IFuseOptions<Album> = {
|
||||
const fuseOptions: IFuseOptions<Album> = {
|
||||
keys: ['Name', 'AlbumArtist', 'AlbumArtists', 'Artists'],
|
||||
threshold: 0.1,
|
||||
includeScore: true,
|
||||
|
||||
Reference in New Issue
Block a user