Replace library sort dropdown with bottom sheet#281
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val currentSongSortOption: SortOption = SortOption.SongTitleAZ, | ||
| val currentAlbumSortOption: SortOption = SortOption.AlbumTitleAZ, | ||
| val currentArtistSortOption: SortOption = SortOption.ArtistNameAZ, | ||
| val currentFavoriteSortOption: SortOption = SortOption.LikedSongTitleAZ, | ||
| val currentFavoriteSortOption: SortOption = SortOption.LikedSongDateLiked, | ||
| val currentFolderSortOption: SortOption = SortOption.FolderNameAZ, | ||
| val searchResults: ImmutableList<SearchResultItem> = persistentListOf(), |
There was a problem hiding this comment.
Avoid defaulting favorites to unsupported "Date liked" sort
The commit changes the initial favorite sort to SortOption.LikedSongDateLiked, but nothing in the repository records when a song was liked—toggleFavoriteSong only keeps a set of IDs and the favoriteSongs flow handles this option by ordering by song.id, which is unrelated to when the user liked the track. After this change, a clean install or cleared preferences will default the Favorites tab to an essentially arbitrary order instead of the previously deterministic alphabetical order. Either keep the alphabetical default or persist a timestamp for likes before making "Date liked" the default.
Useful? React with 👍 / 👎.
This commit refactors the `LibrarySortBottomSheet` to improve its visual styling and code readability. The key changes are: - **Shape:** The selectable sort options now use a `CircleShape` clip, making them fully rounded pills instead of rectangles with rounded corners. - **Padding:** The vertical padding has been moved outside the `clip` modifier to ensure consistent spacing between the pill-shaped options. - **Readability:** Color variables (`selectedColor`, `unselectedColor`) have been introduced to make the selection logic clearer.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f8230b3b50832f9df237aa8f614d45