Suwayomi / Suwayomi-WebUI

Mozilla Public License 2.0
119 stars 50 forks source link

[Question] Close Button at Reader Settings #58

Closed ntbm closed 3 years ago

ntbm commented 3 years ago

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 commented 3 years ago

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

AriaMoradi commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Are we good now?

ntbm commented 3 years ago

Yes