Menu: Enable/Disable the pagination Button properly

Otherwise, the dim state isn't updated properly, because Button trusts the state flag.

Regression since https://github.com/koreader/koreader/commit/6132e8c904c9e019bfd08e6b534306a9decd416d

Fix #7317
This commit is contained in:
NiLuJe
2021-02-20 18:35:57 +01:00
committed by Frans de Jonge
parent 173d9600f0
commit e6a946a048
+2 -2
View File
@@ -967,7 +967,7 @@ function Menu:updatePageInfo(select_number)
-- update page information
if self.page_num > 1 then
self.page_info_text:setText(FFIUtil.template(_("Page %1 of %2"), self.page, self.page_num))
self.page_info_text.enabled = true
self.page_info_text:enable()
else
self.page_info_text:setText("");
end
@@ -984,7 +984,7 @@ function Menu:updatePageInfo(select_number)
self.page_return_arrow:enableDisable(#self.paths > 0)
else
self.page_info_text:setText(_("No choices available"))
self.page_info_text.enabled = false
self.page_info_text:disable()
end
end