Skip to content
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

Re-sort title-sorted bookshelf after title change #4008

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

mikiher
Copy link
Contributor

@mikiher mikiher commented Feb 19, 2025

Brief summary

When a bookshelf is sorted by title and the title of a book/podcast changes (e.g. after being edited), the bookshelf is rebuilt so the book appears at its proper position (based on its new title)

Which issue is fixed?

Fixes #3998

In-depth Description

Up until now, when LazyBookshelf got an item_updated message from the server, it only replaced the old entity with the updated entity. With this change, if the current sort order is by title, and a change of title is detected, resetEntities() is called, and the item is moved to its new position.

How have you tested this?

Changed title of books/podcasts and verified that after saving the change, the book/podcast moved to its new position.

@mikiher mikiher changed the title Resort title-sorted bookshelf after title change Re-sort title-sorted bookshelf after title change Feb 19, 2025
@mikiher mikiher marked this pull request as ready for review February 19, 2025 19:18
@advplyr
Copy link
Owner

advplyr commented Feb 19, 2025

I made a small update so that the scroll position is kept for title change re-sorts. I figured because we know the page size will be the same on an update we might as well keep the scroll pos.

Thanks!

@advplyr advplyr merged commit b5b99cb into advplyr:master Feb 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants