mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Use of new functions to jump to next/previous chapter that also works in 2-page mode
This commit is contained in:
@@ -246,17 +246,17 @@ function ReaderRolling:onResume()
|
||||
end
|
||||
|
||||
function ReaderRolling:onDoubleTapForward()
|
||||
local i = self.ui.toc:_getChapterPagesLeft(self.current_page,-1)
|
||||
local i = self.ui.toc:_getNextChapter(self.current_page+self.ui.document:getVisiblePageCount())
|
||||
if i ~= "" then
|
||||
self:onGotoViewRel(i+1)
|
||||
self:onGotoPage(i)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderRolling:onDoubleTapBackward()
|
||||
local i = self.ui.toc:_getChapterPagesDone(self.current_page)
|
||||
local i = self.ui.toc:_getPreviousChapter(self.current_page)
|
||||
if i ~= "" then
|
||||
self:onGotoViewRel(i)
|
||||
self:onGotoPage(i)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user