Feature/playback queue improvements#108
Merged
theovilardo merged 8 commits intomasterfrom Sep 2, 2025
Merged
Conversation
The playback queue in the UI now correctly updates to reflect the shuffled (or unshuffled) order when the user toggles shuffle mode. This was fixed by calling the existing `updateCurrentPlaybackQueueFromPlayer` function from the `onShuffleModeEnabledChanged` player listener. This ensures the queue is rebuilt from the MediaController, which correctly reports the timeline in the active playback order.
The playback queue in the UI now correctly updates to reflect the shuffled (or unshuffled) order when the user toggles shuffle mode. This is fixed by: 1. Updating `updateCurrentPlaybackQueueFromPlayer` to correctly build the shuffled queue by iterating through the timeline's window indices in shuffled order. 2. Calling this function from the `onShuffleModeEnabledChanged` player listener to ensure the UI is refreshed at the correct time.
This commit introduces two main improvements to the playback queue: 1. **Auto-Dequeue:** Songs are now automatically removed from the queue after they finish playing, provided that repeat mode is turned off. This gives the queue a more traditional "play next" behavior. 2. **UI Enhancements:** The `QueueBottomSheet` has been updated to always display the currently playing song at the top of the list. This item is now static and cannot be reordered, while the rest of the "up next" songs remain reorderable. This provides a clearer and more intuitive user experience.
This commit introduces several improvements to the playback queue to create a more intuitive and standard user experience. 1. **Queue Creation Logic:** The queue is now created starting from the selected song, and only includes subsequent songs from the original context (e.g., album or playlist). Songs before the selected item are discarded from the queue. 2. **Auto-Dequeue:** Songs are automatically removed from the queue after they finish playing (when repeat mode is off). 3. **UI Enhancements:** The `QueueBottomSheet` has been updated to always display the currently playing song at the top of the list. This item is static and cannot be reordered, while the rest of the "up next" songs remain reorderable.
This commit completely revamps the playback queue's behavior to be more intuitive and align with standard music player conventions.
Key changes include:
- **True Queue Behavior**: When playback is initiated from a list (e.g., an album), the queue is now correctly formed starting from the selected song. All preceding songs in the list are discarded, and only the selected song and those following it constitute the "Up Next" queue.
- **Visual Queue Display**: The `QueueBottomSheet` has been updated to only display the currently playing song and the upcoming songs in the queue. Previously played songs are no longer visible in the list, providing a clean and accurate view of what's next.
- **Auto-Dequeue on Completion**: Songs are automatically removed from the queue after they finish playing (when repeat mode is off), reinforcing the progression through the queue.
- **UI/UX Enhancements**:
- The currently playing song is now always fixed at the top of the `QueueBottomSheet` for easy reference.
- This current song item is not reorderable, while the rest of the upcoming songs can be freely reordered by the user via drag-and-drop.
- The reordering logic has been carefully updated to handle the new visual display, ensuring that changes are correctly reflected in the underlying media player's queue.
This commit removes the restriction that prevented users from dragging items to the very beginning of the queue (index 0). The `canDragOver` condition in the `rememberReorderableLazyListState` within `QueueBottomSheet.kt` has been commented out, enabling items to be moved to any position in the queue, including the first one.
This commit improves the user interface for selecting songs to add to a playlist. The following changes have been made in `PlaylistDetailScreen.kt`: - Album art is now displayed next to each song in the "Add Songs to Playlist" modal bottom sheet. The `SmartImage` composable is used for this, with a circular shape and a size of 36dp. - Padding around the checkbox and song details has been adjusted for better visual alignment. - A smooth corner shape (`albumShape`) is now defined for album art display, although it's currently applied as a `CircleShape` in this specific implementation.
The right padding of the search bar's `FilledIconButton` in `LibraryScreen.kt` has been increased from `6.dp` to `14.dp`. This provides more spacing between the button and the edge of the screen or adjacent elements.
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.
No description provided.