mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user