mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Reader: rationalize "Back" key/action handling (#6840)
Have ReaderBack be the sole handler of onBack. Add 4 mutually exclusive options for the Back key, to avoid ReaderLink and ReaderBack location stacks from interfering (ReaderBack's stack being always a superset of ReaderLink's stack). So, remove "Enable back history", which is replaced by Back option "Go to previous read page". Fix a few possible crashes and inconsistencies (when zoom, scroll or reflow have changed) with ReaderPaging and ReaderView when restoring previous page/view.
This commit is contained in:
@@ -41,11 +41,8 @@ function ReaderLink:init()
|
||||
doc = "go to selected page link",
|
||||
event = "GotoSelectedPageLink",
|
||||
}
|
||||
self.key_events.GoBackLink = {
|
||||
{ "Back" },
|
||||
doc = "go back from link",
|
||||
event = "GoBackLink",
|
||||
}
|
||||
-- "Back" is handled by ReaderBack, which will call our onGoBackLink()
|
||||
-- when G_reader_settings:readSetting("back_in_reader") == "previous_location"
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
self.ui:registerTouchZones({
|
||||
|
||||
Reference in New Issue
Block a user