mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix bug no default zoom mode bug in readerpaging
reported by @chrox, see #647
This commit is contained in:
@@ -65,6 +65,14 @@ function ReaderPaging:init()
|
||||
self.number_of_pages = self.ui.document.info.number_of_pages
|
||||
end
|
||||
|
||||
function ReaderPaging:onReadSettings(config)
|
||||
self:gotoPage(config:readSetting("last_page") or 1)
|
||||
end
|
||||
|
||||
function ReaderPaging:onCloseDocument()
|
||||
self.ui.doc_settings:saveSetting("last_page", self.current_page)
|
||||
end
|
||||
|
||||
-- wrapper for bounds checking
|
||||
function ReaderPaging:gotoPage(number)
|
||||
if number == self.current_page then
|
||||
@@ -83,10 +91,6 @@ function ReaderPaging:gotoPage(number)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderPaging:onReadSettings(config)
|
||||
self:gotoPage(config:readSetting("last_page") or 1)
|
||||
end
|
||||
|
||||
function ReaderPaging:onZoomModeUpdate(new_mode)
|
||||
-- we need to remember zoom mode to handle page turn event
|
||||
self.zoom_mode = new_mode
|
||||
@@ -159,10 +163,6 @@ function ReaderPaging:onGotoPageRel(diff)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderPaging:onCloseDocument()
|
||||
self.ui.doc_settings:saveSetting("last_page", self.current_page)
|
||||
end
|
||||
|
||||
function ReaderPaging:onTapForward()
|
||||
self:onGotoPageRel(1)
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user