mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderPaging: allow for page diff greater than 1 in onScrollPageRel (#8836)
Cf. <https://www.mobileread.com/forums/showthread.php?p=4200567>.
This commit is contained in:
@@ -861,7 +861,11 @@ end
|
||||
|
||||
function ReaderPaging:onScrollPageRel(page_diff)
|
||||
if page_diff == 0 then return true end
|
||||
if page_diff > 0 then
|
||||
if page_diff > 1 or page_diff < -1 then
|
||||
-- More than 1 page, don't bother with how far we've scrolled.
|
||||
self:onGotoRelativePage(Math.round(page_diff))
|
||||
return true
|
||||
elseif page_diff > 0 then
|
||||
-- page down, last page should be moved to top
|
||||
local last_page_state = table.remove(self.view.page_states)
|
||||
local last_visible_area = last_page_state.visible_area
|
||||
|
||||
Reference in New Issue
Block a user