chore: upgrade all dependencies
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user