mirror of
https://github.com/koreader/koreader
synced 2024-11-11 19:11:14 +00:00
fix end_position calculation in Menu:onNextPage
This commit is contained in:
parent
77761554d9
commit
7d008bf622
@ -357,6 +357,9 @@ function Menu:onNextPage()
|
|||||||
elseif self.page == self.page_num then
|
elseif self.page == self.page_num then
|
||||||
-- on the last page, we check if we're on the last item
|
-- on the last page, we check if we're on the last item
|
||||||
local end_position = #self.item_table % self.perpage
|
local end_position = #self.item_table % self.perpage
|
||||||
|
if end_position == 0 then
|
||||||
|
end_position = self.perpage
|
||||||
|
end
|
||||||
if end_position ~= self.selected.y then
|
if end_position ~= self.selected.y then
|
||||||
self:updateItems(end_position)
|
self:updateItems(end_position)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user