Use of new functions to jump to next/previous chapter that also works in 2-page mode

This commit is contained in:
WS64
2014-07-15 12:19:19 +02:00
parent 9bdcaa2b46
commit 225966ef62

View File

@@ -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