2
0
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:
Qingping Hou 2012-06-12 15:59:35 +08:00
parent 77761554d9
commit 7d008bf622

View File

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