mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Cleanup: Remove unused onAnyKeyPressed handlers
And simplify the few we do catch by using aliases instead of duplicated functions;).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user