Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes and issue with back button navigation from manga screen.
It changes the back button in
DefaultNavBar
to take into accountlocation.state
. This allows pages to specify behavior of back button on next page. Next page then can discern between navigating usinghistory.goBack()
or navigating to some default url instead of "hoping" thatgoBack()
goes to correct screen.In manga screen, this fixes issue where, coming from reader screen, and then clicking "back" button on manga screen would put user back to reader screen.
It also changes behavior of ReaderNavBar back button to simillary handle
location.state
In reader screen, this fixes issue where if reader screen is open directly, the back button would not work.
Downside is that location state needs to be passed around in reader screen when changing chapters.
The
backLink
in location state can either be specific url or it can be set to__BACK__
to explicitly have the back button dohistory.goBack()
.