Skip to content

fix: queue the whole Downloaded/Favourites list on tap - #341

Open
pyss56 wants to merge 1 commit into
ghenry22:masterfrom
pyss56:fix/downloaded-filter-queue
Open

pyss56 wants to merge 1 commit into
ghenry22:masterfrom
pyss56:fix/downloaded-filter-queue

Conversation

@pyss56

@pyss56 pyss56 commented Nov 13, 2026

Copy link
Copy Markdown

Problem

Tapping a song in Library -> Songs with the Downloaded (or Favourites) filter starts a queue containing only that one track. As a result:

  • the player's Shuffle button is disabled (queueLength < 2) and shuffleQueue() returns immediately;
  • Repeat all can only repeat that single track instead of the downloaded list;
  • next/previous cannot move through the downloaded songs.

Root cause

FilteredSongList shares its viewProps - including onSongPress: 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 same sort_* keys, so that restriction does not apply to them. SongListView's default handler already queues items.map(toSong); supplying onSongPress short-circuits it.

Fix

Stop passing onSongPress from FilteredSongList. SongListView then builds the queue from the entire filtered list at press time, and playTrack() resolves the tapped track by id to pick the start index. The paged keyset list keeps its single-track override.

No changes to repeat/shuffle state: repeatMode remains the single global, persisted setting and shuffleQueue() 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 --noEmit passes.
  • 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 leave onSongPress unset while the paged keyset list still sets it.
  • ListViewRowAdapter.test.tsx + downloadedFilterPlayPath.test.ts: 98 tests pass.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant