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

[Question] Close Button at Reader Settings #58

Closed
ntbm opened this issue Oct 31, 2021 · 6 comments
Closed

[Question] Close Button at Reader Settings #58

ntbm opened this issue Oct 31, 2021 · 6 comments

Comments

@ntbm
Copy link
Contributor

ntbm commented Oct 31, 2021

The Close Icon in the Reader Settings onClick calls history.back() which is the previous chapter if you've read a while.
Is this intended behaviour? For me the expected behavior would be either closing the Settings Nav(but there's already a button for it) or going back to the manga detail page.

@AriaMoradi
Copy link
Member

It used to work like that, but with the new back button being added, its changed and now broken?

@AriaMoradi
Copy link
Member

as a fix, the back button could pop any path urls that have /chapter/ in them? until it reaches something else
or pop and then redirect to manga page?

@ff2400t
Copy link
Contributor

ff2400t commented Oct 31, 2021

When you go to the prev/next chapter in the reader view, there no new entry made to history stack, instead it replaces current entry on History.
So,
If history is
Manga -> chapter 1.
Then going to the next chapter will change the history to
Manga -> Chapter 2.
So using history.back() is all we need to go back since nothing is added to the stack after the initial chapter entry

@ntbm
Copy link
Contributor Author

ntbm commented Oct 31, 2021

For the Chapter Selection in the Nav that's true, but not for the Chapters which were loaded while in endless mode.
See:
https://github.com/Suwayomi/Tachidesk-WebUI/blob/51008b7ee4845b77591616292d377604e3c588c6/src/screens/Reader.tsx#L154-L169

@AriaMoradi
Copy link
Member

Are we good now?

@ntbm
Copy link
Contributor Author

ntbm commented Oct 31, 2021

Yes

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

No branches or pull requests

3 participants