2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

ReaderFooter: Workaround a bad interaction with ReaderHighlight (#7466)

Related to hold handlers.

Fix #7464
This commit is contained in:
NiLuJe 2021-03-30 20:01:38 +02:00 committed by GitHub
parent 975e2d4b80
commit 766ec91a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2161,6 +2161,11 @@ function ReaderFooter:onTapFooter(ges)
end
function ReaderFooter:onHoldFooter()
-- We're lower priority than readerhighlight_hold, which means it's already been tripped by the time we got here.
-- If it actually had something to do, ReaderHighlight would have stopped propagating the event,
-- so we can safely clear ReaderHighlight state here, otherwise it'll get confused on the next tap...
-- (c.f., #7464)
self.ui.highlight:clear()
if self.mode == self.mode_list.off then return end
if self.settings.skim_widget_on_hold then
self.ui:handleEvent(Event:new("ShowSkimtoDialog"))