mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderUI: Properly neuter gesture handling from InputContainer modules
None[1] of them actually rely on their own onGesture handler, they all register their own stuff to ReaderUI's. Hotfix #9710 revealed that the way this was handled didn't exactly work as expected ;). The only thing that consumes ges_events is InputContainer's onGesture method. All these modules *extend* InputContainer, but none of them *implement* a custom onGesture, so self.onGesture = nil was just a NOP, they always access InputContainer's method via inheritance. If we actively want to neuter it, we *have* to implement it in that module (with a NOP). [1] The exception being ReaderZooming, but that only when in flip mode.
This commit is contained in:
@@ -230,13 +230,14 @@ function ReaderHighlight:init()
|
||||
self.ui:registerPostInitCallback(function()
|
||||
self.ui.menu:registerToMainMenu(self)
|
||||
end)
|
||||
|
||||
-- delegate gesture listener to readerui, NOP our own
|
||||
self.ges_events = nil
|
||||
end
|
||||
|
||||
function ReaderHighlight:setupTouchZones()
|
||||
-- delegate gesture listener to readerui
|
||||
self.ges_events = {}
|
||||
self.onGesture = nil
|
||||
function ReaderHighlight:onGesture() end
|
||||
|
||||
function ReaderHighlight:setupTouchZones()
|
||||
if not Device:isTouchDevice() then return end
|
||||
local hold_pan_rate = G_reader_settings:readSetting("hold_pan_rate")
|
||||
if not hold_pan_rate then
|
||||
|
||||
Reference in New Issue
Block a user