DictQuickLookup: update to TitleBar widget

Also tweak ReaderHighlight:onHoldRelease() to avoid
doing its stuff when onHold() is clearing highlight
(previous CheckButton was closing/clearing on hold
release, new TitleBar close button does that on hold).
This commit is contained in:
poire-z
2022-01-08 16:58:32 +01:00
parent 4546d826ee
commit 48ca7e820c
2 changed files with 22 additions and 51 deletions

View File

@@ -1327,6 +1327,14 @@ function ReaderHighlight:onTranslateText(text)
end
function ReaderHighlight:onHoldRelease()
if self.clear_id then
-- Something has requested a clear id and is about to clear
-- the highlight: it may be a onHoldClose() that handled
-- "hold" and was closed, and can't handle "hold_release":
-- ignore this "hold_release" event.
return true
end
local default_highlight_action = G_reader_settings:readSetting("default_highlight_action", "ask")
if self.select_mode then -- extended highlighting, ending fragment