mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
chore: minor style cleanup
This commit is contained in:
parent
e5c1ff1ef6
commit
26f5c8861b
@ -133,7 +133,7 @@ function ReaderHighlight:onClearHighlight()
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderHighlight:onTap(arg, ges)
|
||||
function ReaderHighlight:onTap(_, ges)
|
||||
if not self:clear() then
|
||||
if self.ui.document.info.has_pages then
|
||||
return self:onTapPageSavedHighlight(ges)
|
||||
@ -222,7 +222,7 @@ function ReaderHighlight:onShowHighlightDialog(page, index)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderHighlight:onHold(arg, ges)
|
||||
function ReaderHighlight:onHold(_, ges)
|
||||
-- disable hold gesture if highlighting is disabled
|
||||
if self.view.highlight.disabled then return true end
|
||||
self.hold_pos = self.view:screenToPageTransform(ges.pos)
|
||||
@ -249,7 +249,7 @@ function ReaderHighlight:onHold(arg, ges)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderHighlight:onHoldPan(arg, ges)
|
||||
function ReaderHighlight:onHoldPan(_, ges)
|
||||
if self.hold_pos == nil then
|
||||
DEBUG("no previous hold position")
|
||||
return true
|
||||
@ -257,7 +257,7 @@ function ReaderHighlight:onHoldPan(arg, ges)
|
||||
local page_area = self.view:getScreenPageArea(self.hold_pos.page)
|
||||
DEBUG("current page area", page_area)
|
||||
if ges.pos:notIntersectWith(page_area) then
|
||||
DEBUG("not inside page area")
|
||||
DEBUG("not inside page area", ges, page_area)
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -334,7 +334,7 @@ function GestureDetector:handleDoubleTap(tev)
|
||||
if self.last_taps[slot] ~= nil then
|
||||
self.last_taps[slot] = nil
|
||||
-- we are using closure here
|
||||
DEBUG("single tap detected in slot", slot)
|
||||
DEBUG("single tap detected in slot", slot, ges_ev.pos)
|
||||
return ges_ev
|
||||
end
|
||||
end, deadline)
|
||||
|
Loading…
Reference in New Issue
Block a user