Repository navigation
fix(library): sort Saved Albums by default_sort_saved_albums when a page loads - #1099
Conversation
…age loads Signed-off-by: oktay <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
kapok-4o
left a comment
There was a problem hiding this comment.
Looks good. The new regression test fails on origin/main with the original album order and passes with this change. I also checked later pages, replacement pages, descending sorts and equal keys. The local format, Clippy and test checks passed, and all 130 generated GUI binding files match the committed versions.
# Conflicts: # CHANGELOG.md
# Summary Adds seven authors of recently merged PRs to `.all-contributorsrc` and the README contributor table, one commit each in the all-contributors bot format: - polete-bermejo: code (#1116) - Seyamalam: code (#1115) - akshit-bansal11: code, doc (#1102, #1111) - D0ktay: code (#1099) - zuhairkhalid229: code (#1098) - ViktorBystrov72: code (#1096) - PiyushChoudhary-Git: code (#1092) # Testing - `jq` reads `.all-contributorsrc`: 91 contributors (84 before). - The README table fills the last row to 7 cells and starts a new row with the other 6. # Additional notes Names, avatars and profile links come from each user's public GitHub profile, the same fields the bot uses. --- <sub>💬 Questions or want to chat with other contributors? Join the [spotatui Discord](https://spotatui.com/discord).</sub> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated contributor acknowledgements in the project records and README, adding seven contributor records and six README entries. * The README entries include code contributions and a documentation credit. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
default_sort_saved_albumsonly seededApp.album_sortat startup, and nothing sorted the rows when a Saved Albums page arrived, so the list always opened in Spotify's order (newest saved first).store_saved_albums_pagenow callssort_saved_albums()after storing the page, the same way Saved Artists and Recently Played follow their own default sort. With the built-indefaultvalue the order is unchanged (stable descending sort onadded_at).Other changes: new test
stored_saved_albums_page_follows_the_default_sortand aCHANGELOG.mdline under### Fixed.Fixes #1020
Testing
cargo test --no-default-features --features telemetry,tui stored_saved_albums_page_follows_the_default_sortsort_saved_albums()call removed, the same test fails.cargo fmt --all -- --check: no output, exit 0cargo clippy --no-default-features --features telemetry,tui -- -D warnings:Finished, exit 0cargo test --no-default-features --features telemetry,tui:1961 passed; 0 failedgit diff --exit-code tools/gates.count: exit 0Additional notes
Summary by CodeRabbit