fix artist alpha sorting using articles/etc

improve performance on list rendering to reduce requests
This commit is contained in:
austinried 2021-08-22 14:03:52 +09:00
parent 22b6524e8c
commit 3077b4351b
3 changed files with 4 additions and 4 deletions

View File

@ -89,6 +89,7 @@ const AlbumsList = () => {
overScrollMode="never"
onEndReached={fetchNextPage}
onEndReachedThreshold={6}
windowSize={5}
/>
<FilterButton
data={filterOptions}

View File

@ -29,14 +29,11 @@ const ArtistsList = () => {
useEffect(() => {
switch (filter.type) {
case 'alphabeticalByName':
setSortedList([...list].sort((a, b) => a.name.localeCompare(b.name)))
break
case 'random':
setSortedList([...list].sort(() => Math.random() - 0.5))
break
case 'starred':
setSortedList([...list].sort((a, b) => a.name.localeCompare(b.name)).filter(a => a.starred))
setSortedList([...list].filter(a => a.starred))
break
default:
setSortedList([...list])
@ -54,6 +51,7 @@ const ArtistsList = () => {
onRefresh={refresh}
refreshing={refreshing}
overScrollMode="never"
windowSize={3}
/>
<FilterButton
data={filterOptions}

View File

@ -24,6 +24,7 @@ const PlaylistsList = () => {
onRefresh={refresh}
refreshing={refreshing}
overScrollMode="never"
windowSize={5}
/>
)
}