fix bug no default zoom mode bug in readerpaging
reported by @chrox, see #647
This commit is contained in:
1 parent
ae1c489a0f
commit
d077bafb6d
3 files changed
+65
-42
No files matched your search
@@ -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