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

@@ -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)