Cleanup: Remove unused onAnyKeyPressed handlers

And simplify the few we do catch by using aliases instead of duplicated
functions;).
This commit is contained in:
NiLuJe
2022-10-23 22:36:09 +02:00
parent 78381c3afa
commit d2ac2ca6e7
13 changed files with 14 additions and 75 deletions

View File

@@ -479,10 +479,6 @@ function ReaderProgress:genSummaryWeek(width)
}
end
function ReaderProgress:onAnyKeyPressed()
return self:onClose()
end
function ReaderProgress:onSwipe(arg, ges_ev)
if ges_ev.direction == "south" then
-- Allow easier closing with swipe up/down
@@ -499,17 +495,15 @@ function ReaderProgress:onSwipe(arg, ges_ev)
end
end
function ReaderProgress:onMultiSwipe(arg, ges_ev)
-- For consistency with other fullscreen widgets where swipe south can't be
-- used to close and where we then allow any multiswipe to close, allow any
-- multiswipe to close this widget too.
self:onClose()
return true
end
function ReaderProgress:onClose()
UIManager:close(self)
return true
end
ReaderProgress.onAnyKeyPressed = ReaderProgress.onClose
-- For consistency with other fullscreen widgets where swipe south can't be
-- used to close and where we then allow any multiswipe to close, allow any
-- multiswipe to close this widget too.
ReaderProgress.onMultiSwipe = ReaderProgress.onClose
return ReaderProgress