ReaderPaging: allow for page diff greater than 1 in onScrollPageRel (#8836)

Cf. <https://www.mobileread.com/forums/showthread.php?p=4200567>.
reviewable/pr8863/r1
Frans de Jonge 2 years ago committed by GitHub
parent 41e57fccd2
commit d691964c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save