-
Notifications
You must be signed in to change notification settings - Fork 22
Migrate the Songs tab from Library to Compose. #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rivaldi8
wants to merge
31
commits into
timusus:main
Choose a base branch
from
rivaldi8:migrate-songs-list-to-compose
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
They are useful. From Kotlin coding conventions (*):
Using trailing commas has several benefits:
- It makes version-control diffs cleaner – as all the focus is on
the changed value.
- It makes it easy to add and reorder elements – there is no need to
add or delete the comma if you manipulate elements.
- It simplifies code generation, for example, for object
initializers. The last element can also have a comma.
Trailing commas are entirely optional – your code will still work
without them. The Kotlin style guide encourages the use of trailing
commas at the declaration site and leaves it at your discretion for
the call site.
(*) https://kotlinlang .org/docs/coding-conventions.html#trailing-commas
This happened only from time to time, after switching to other tabs or pages. The menu would appear only with the "New playlist" entry. It would fix itself after switching to other tabs (not always). The issue was the playlist list passed to the genre list composable wasn't using a reactive type, so it wouldn't trigger a recomposition if it changed. I guess there's some race condition that make it work most of the time.
rivaldi8
commented
Dec 20, 2025
| } | ||
|
|
||
| viewModelScope.launch { | ||
| playbackManager.shuffle(songs) { result -> |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the type completion parameter in PlaybackManager.shuffle is Result<Any?> instead of Result<Boolean> (from PlaybackManager.load)?
f62b78d to
9985bf6
Compare
As it was before the migration, no popup was shown for 'Last modified' and Duration sort orders.
This would happen, for example, when scrolling the song list with Year order selected. There wasn't space at the start and end of the popup bubble, which made it look cramped.
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.
While implementing the song selection stuff I've detected some issues and inconsistencies with other Android applications. As they're not related to the migration (the already existed), I'll rather fix them in a separate pull request when this one is closed.
Unrelated to this tab, also fix genre context menu having no playlists on "Add to playlist" submenu. This happened only from time to time, after switching to other tabs or pages. The menu would appear only with the "New playlist" entry. It would fix itself after switching to other tabs (not always).
The issue was the playlist list passed to the genre list composable wasn't using a reactive type, so it wouldn't trigger a recomposition if it changed. I guess there's some race condition that make it work most of the time.