mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
clean up refreshes
This is a larger clean-up of the refresh situation. The general shift is that refreshes are now mainly triggered by the (top-level) widgets when they get shown or closed via UIManager. All refreshes for the widgets when they are in use were handled by themselves before. This adds the case of showing/closing. It is the desired result of not having UIManager:show()/:close() do (full screen) refreshes on its own.
This commit is contained in:
@@ -241,6 +241,7 @@ function ReaderHighlight:onHold(arg, ges)
|
||||
end
|
||||
UIManager:setDirty(self.dialog, "partial")
|
||||
-- TODO: only mark word?
|
||||
-- Unfortunately, CREngine does not return good coordinates
|
||||
-- UIManager:setDirty(self.dialog, "partial", self.selected_word.sbox)
|
||||
end
|
||||
return true
|
||||
@@ -368,9 +369,7 @@ function ReaderHighlight:onHoldRelease()
|
||||
},
|
||||
tap_close_callback = function() self:handleEvent(Event:new("Tap")) end,
|
||||
}
|
||||
UIManager:show(self.highlight_dialog, nil, nil, function()
|
||||
return "partial", self.highlight_dialog.dimen
|
||||
end)
|
||||
UIManager:show(self.highlight_dialog)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user