mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix end_position calculation in Menu:onNextPage
This commit is contained in:
@@ -357,6 +357,9 @@ function Menu:onNextPage()
|
||||
elseif self.page == self.page_num then
|
||||
-- on the last page, we check if we're on the last item
|
||||
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
|
||||
self:updateItems(end_position)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user