optimize gathering album art a bit

This commit is contained in:
austinried
2021-08-20 12:52:57 +09:00
parent 06e84fec8d
commit 694d730ebd
3 changed files with 16 additions and 14 deletions

View File

@@ -12,8 +12,7 @@ import { useStore } from '@app/state/store'
import { selectTrackPlayer } from '@app/state/trackplayer'
import colors from '@app/styles/colors'
import font from '@app/styles/font'
import { useNavigation } from '@react-navigation/native'
import React, { useEffect, useState } from 'react'
import React, { useState } from 'react'
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'
type SongListType = 'album' | 'playlist'
@@ -144,12 +143,6 @@ const SongListView = React.memo<{
title: string
type: SongListType
}>(({ id, title, type }) => {
const navigation = useNavigation()
useEffect(() => {
navigation.setOptions({ title })
})
return type === 'album' ? <AlbumView id={id} title={title} /> : <PlaylistView id={id} title={title} />
})