mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Try to avoid more update_regions_func mismatches
scheduling tricks
This commit is contained in:
committed by
Hans-Werner Hilse
parent
f6753085ef
commit
e9573ebe58
@@ -152,14 +152,14 @@ end
|
||||
|
||||
function Button:onTapSelectButton()
|
||||
if self.enabled and self.callback then
|
||||
self[1].invert = true
|
||||
-- NOTE: Nope, this breaks the FM, by only refreshing the buttons themselves :D.
|
||||
--[[
|
||||
UIManager.update_regions_func = function()
|
||||
return {self[1].dimen}
|
||||
end
|
||||
--]]
|
||||
UIManager:setDirty(self.show_parent, "partial")
|
||||
UIManager:scheduleIn(0.0, function()
|
||||
self[1].invert = true
|
||||
UIManager.update_regions_func = function()
|
||||
return {self[1].dimen}
|
||||
end
|
||||
UIManager.repaint_all = true -- FIXME: Why?
|
||||
UIManager:setDirty(self.show_parent, "partial")
|
||||
end)
|
||||
UIManager:scheduleIn(0.1, function()
|
||||
self.callback()
|
||||
self[1].invert = false
|
||||
|
||||
Reference in New Issue
Block a user