Repository navigation
Conversation
The filtered lists are whole-set SQL reads, but they reused the paged keyset list's single-track tap override, so the play queue always held one song. That made shuffle a no-op and reduced repeat-all to repeating that one track. Leave onSongPress unset for the filtered branches so SongListView's default queues the entire list, with the tapped song as the start index. The global repeat mode and shuffle now act on all downloaded/starred songs, matching albums, playlists and the Favourites tab. The paged keyset list keeps its single-track override: a bounded window cannot stand in for the whole library.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Tapping a song in Library -> Songs with the Downloaded (or Favourites) filter starts a queue containing only that one track. As a result:
queueLength < 2) andshuffleQueue()returns immediately;Root cause
FilteredSongListshares itsviewProps- includingonSongPress: handleSongPress- with the paged keyset browse list. That handler deliberately plays just the tapped song because a bounded keyset window cannot stand in for the whole library. But the Downloaded/Favourites filters are whole-set SQL reads (useDownloadedSongs,listAllStarredSongs) ordered by the samesort_*keys, so that restriction does not apply to them.SongListView's default handler already queuesitems.map(toSong); supplyingonSongPressshort-circuits it.Fix
Stop passing
onSongPressfromFilteredSongList.SongListViewthen builds the queue from the entire filtered list at press time, andplayTrack()resolves the tapped track byidto pick the start index. The paged keyset list keeps its single-track override.No changes to repeat/shuffle state:
repeatModeremains the single global, persisted setting andshuffleQueue()remains a one-shot shuffle of the current queue. With a multi-track queue they now act on all downloaded/starred songs, exactly as they do for albums, playlists and the Favourites tab.Behaviour change
Tapping a song in these filtered lists now continues playing the rest of the list instead of stopping after one track - consistent with every other list in the app.
Verification
npx tsc --noEmitpasses.npx jest src/screens/__tests__/song-library-list.test.tsx --no-coverage: 62 tests pass across the android and ios projects, including three new assertions that the Downloaded and Favourites branches leaveonSongPressunset while the paged keyset list still sets it.ListViewRowAdapter.test.tsx+downloadedFilterPlayPath.test.ts: 98 tests pass.