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

Fix book limit for the Continue Series shelf (with skip earlier books toggle active) #2789

Conversation

justcallmelarry
Copy link
Contributor

Currently the Continue Series shelf (with skip earlier books toggle active) returns some weird results if you have more than 10 series which has a read book, but not all of them have a book that qualifies for the constrains of being of a higher sequence number than the ones already finished.

This is because the sql query returns the 10 series with most recent progress that fit for the untoggled library setting.

In order to solve the issues caused by this, I added the same sql query that calculates the maxSequence number to the original where-query, so that it will only return series that we know has books in them that are of a higher sequence than the ones already read.

The post-query code is still there, since the query still returns books that are below the maxSequence number.

Unfortunately the maxSequenceQuery is run twice against the db, but I did not figure out a better way of running the query in the current code base.

I am open to suggestions on improvements, though!

@advplyr
Copy link
Owner

advplyr commented Mar 25, 2024

I can't think of a better way to do that either without refactoring that a bit. These queries are something I have planned on refactoring since they were put together to support the old data model. I am hesitant on making these any slower than they already are but I don't see another fix for now.
Thanks!

@advplyr advplyr merged commit fc26b7a into advplyr:master Mar 25, 2024
2 checks passed
@justcallmelarry justcallmelarry deleted the bugfix/corretly-working-limit-for-continue-series-toggle branch March 25, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants