mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ButtonProgressWidget: Make hold_callback optional (#8940)
We don't need one in FrontLightWidget ;). Fix https://github.com/koreader/koreader/issues/8913#issuecomment-1074915143
This commit is contained in:
@@ -98,9 +98,7 @@ function ButtonProgressWidget:update()
|
||||
self.callback("-")
|
||||
self:update()
|
||||
end,
|
||||
hold_callback = function()
|
||||
self.hold_callback("-")
|
||||
end,
|
||||
hold_callback = self.hold_callback and function() self.hold_callback("-") end,
|
||||
}
|
||||
if self.thin_grey_style then
|
||||
button.frame.color = Blitbuffer.COLOR_DARK_GRAY
|
||||
@@ -147,9 +145,7 @@ function ButtonProgressWidget:update()
|
||||
self:update()
|
||||
end,
|
||||
no_focus = highlighted,
|
||||
hold_callback = function()
|
||||
self.hold_callback(i)
|
||||
end,
|
||||
hold_callback = self.hold_callback and function() self.hold_callback(i) end,
|
||||
}
|
||||
if self.thin_grey_style then
|
||||
if is_default then
|
||||
@@ -204,9 +200,7 @@ function ButtonProgressWidget:update()
|
||||
self.callback("+")
|
||||
self:update()
|
||||
end,
|
||||
hold_callback = function()
|
||||
self.hold_callback("+")
|
||||
end,
|
||||
hold_callback = self.hold_callback and function() self.hold_callback("+") end,
|
||||
}
|
||||
|
||||
if self.thin_grey_style then
|
||||
@@ -241,9 +235,7 @@ function ButtonProgressWidget:update()
|
||||
self.callback("⋮")
|
||||
self:update()
|
||||
end,
|
||||
hold_callback = function()
|
||||
self.hold_callback("⋮")
|
||||
end,
|
||||
hold_callback = self.hold_callback and function() self.hold_callback("⋮") end,
|
||||
}
|
||||
if self.thin_grey_style then
|
||||
button.frame.color = Blitbuffer.COLOR_DARK_GRAY
|
||||
|
||||
Reference in New Issue
Block a user