-
Notifications
You must be signed in to change notification settings - Fork 33
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
How to know if the navigator reached the end of the publication? #157
Comments
Hi, Actually There's currently no easy way to know that we are at the last page in the book, but it's an interesting use case, and we might need to add something either in the Navigator API or the Locator model. A PR that is in review will make this a bit simpler (readium/r2-navigator-swift#65), by providing two ways to know if we're close to the end of the book:
Personally I don't think we should modify the |
Hi! Oh i see, so notifiedCurrentLocation is a no go then. Adding more information in the navigator API would be optimal. Maybe we then could listen to if the user already is on the last page and tries to go to the next one. So that our popup allows the user to finish reading the whole preview first :) But until then the we'll probably go with Thanks for the help! |
@cNille Hi, The For the rest, I'm keeping it in mind for the next evolution of the navigator API. |
Moving this to I'm considering maybe a simpler way to address this issue: since the navigator knows if it reached the end, it could modify the last This means that when reaching the last page, the locator would target the bottom of the page instead of the top like with the other locators. It's a bit incoherent so I'm on the fence, but it might be more practical/useful. Any risk in this approach? |
Hi!
In our app we offer users to preview an ebook. We would like to know when the last page of the preview is reached so that we can show a popup offering the whole book.
Could you change
notifyCurrentLocation
inEPUBNavigatorViewController
to allow us track when the user hits the last page? Because I guess thatnotifiedCurrentLocation == currentLocation
in that case.Either if the function is protected so that we could override it, or maybe add a function in the delegate protocol thats called within the else-statement.
What are your thoughts on how we solve our issue? :)
The text was updated successfully, but these errors were encountered: