mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Drop test if *_func is a function
This commit is contained in:
@@ -127,7 +127,7 @@ function CheckButton:onTapCheckButton()
|
||||
if not self.enabled then return true end
|
||||
if self.tap_input then
|
||||
self:onInput(self.tap_input)
|
||||
elseif type(self.tap_input_func) == "function" then
|
||||
elseif self.tap_input_func then
|
||||
self:onInput(self.tap_input_func())
|
||||
else
|
||||
if G_reader_settings:isFalse("flash_ui") then
|
||||
@@ -184,7 +184,7 @@ function CheckButton:onHoldCheckButton()
|
||||
elseif self.hold_input then
|
||||
self:onInput(self.hold_input, true)
|
||||
self._hold_handled = true
|
||||
elseif type(self.hold_input_func) == "function" then
|
||||
elseif self.hold_input_func then
|
||||
self:onInput(self.hold_input_func(), true)
|
||||
self._hold_handled = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user