mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix tap on word title will crash koreader
This commit is contained in:
@@ -249,7 +249,9 @@ function UIManager:setDirty(widget, refresh_type)
|
||||
if not refresh_type then
|
||||
refresh_type = "auto"
|
||||
end
|
||||
self._dirty[widget] = refresh_type
|
||||
if widget then
|
||||
self._dirty[widget] = refresh_type
|
||||
end
|
||||
end
|
||||
|
||||
function UIManager:insertZMQ(zeromq)
|
||||
|
||||
@@ -147,7 +147,7 @@ function Button:showHide(show)
|
||||
end
|
||||
|
||||
function Button:onTapSelect()
|
||||
if self.enabled then
|
||||
if self.enabled and self.callback then
|
||||
self[1].invert = true
|
||||
UIManager:setDirty(self.show_parent, "partial")
|
||||
UIManager:scheduleIn(0.1, function()
|
||||
|
||||
Reference in New Issue
Block a user