mirror of
https://github.com/koreader/koreader.git
synced 2026-11-27 06:43:01 +00:00
Button: don't handle long-press when not enabled
It was only not handled when hold_callback. Do that also when hold_input/hold_input_func. Also fix the handling of HoldRelease (as the Hold may change the state of 'enabled', so we can't rely on it to guess the Hold is being handled by Button). Menu: prevent long-press on "No choice available", as there's then no page to navigate to.
This commit is contained in:
1 parent
e44c170f59
commit
6132e8c904
2 files changed
+19
-12
No files matched your search
@@ -1024,6 +1024,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
|
||||
else
|
||||
self.page_info_text:setText("");
|
||||
end
|
||||
@@ -1040,6 +1041,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
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user