Add multi-select and batch actions to the album/playlist screen - #1686
Open
wenpeishao wants to merge 1 commit into
Open
Add multi-select and batch actions to the album/playlist screen#1686wenpeishao wants to merge 1 commit into
wenpeishao wants to merge 1 commit into
Conversation
Long-press a track on an album or playlist to enter selection mode; tap to toggle. A contextual app bar shows the selected count with select-all, and a bottom action bar performs the batch equivalents of the per-track actions: play, add to queue, play next, add to next up, add to playlist (and remove from playlist inside playlists), and add/remove favourite. Selection state is a screen-scoped Riverpod NotifierProvider.family (no code generation needed). TrackListTile only participates when given a selectionScope, so every other use of the tile is unaffected. Batch queue actions use PlayableSlice.simple over the selected tracks.
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.
What
Adds QQ Music-style multi-select to the album and playlist detail screen. Long-press a track to enter selection mode; tap to toggle. A contextual app bar shows the selected count with select-all, and a bottom action bar performs the batch equivalents of the per-track actions:
How
NotifierProvider.family(trackSelectionProvider, keyed by the album/playlist id). It's a plain manual provider, so no code generation is required.TrackListTilegains an opt-inselectionScopeparam. When set, tapping toggles selection and long-pressing enters selection mode (instead of opening the track menu), a selection indicator is drawn, and swipe is disabled. When null — every other use of the tile, e.g. playback history — the tile is unchanged.PlayableSlice.simple(selectedTracks, source)and go throughQueueService. Favourites reuseisFavoriteProvider(...).updateFavorite(...). Add / remove to playlist reusesshowPlaylistActionsMenu(items:, parentPlaylist:).selectAll,deselectAll,itemsSelected) are added toapp_en.arb; everything else reuses existing keys.Notes
TrackListTilechange makes extending this to the Songs tab a small follow-up.flutter analyzewith no new errors.