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:
@@ -199,17 +199,13 @@ function Notification:onShow()
|
||||
return true
|
||||
end
|
||||
|
||||
function Notification:onAnyKeyPressed()
|
||||
if self.toast then return end -- should not happen
|
||||
UIManager:close(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function Notification:onTapClose()
|
||||
if self.toast then return end -- should not happen
|
||||
UIManager:close(self)
|
||||
return true
|
||||
end
|
||||
Notification.onAnyKeyPressed = Notification.onTapClose
|
||||
|
||||
-- Toasts should go bye-bye on user input, without stopping the event's propagation.
|
||||
function Notification:onKeyPress(key)
|
||||
|
||||
Reference in New Issue
Block a user