mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ExternalKeyboard: Don't spam the "Keyboard connected" InfoMessage
Only show it for the first keyboard
This commit is contained in:
@@ -329,10 +329,13 @@ function ExternalKeyboard:setupKeyboard(event_path)
|
||||
Device.hasKeyboard = yes
|
||||
Device.hasDPad = has_dpad_func
|
||||
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Keyboard connected"),
|
||||
timeout = 1,
|
||||
})
|
||||
-- Only show this once
|
||||
if ExternalKeyboard.connected_keyboards == 1 then
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Keyboard connected"),
|
||||
timeout = 1,
|
||||
})
|
||||
end
|
||||
InputText.initInputEvents()
|
||||
UIManager:broadcastEvent(Event:new("PhysicalKeyboardConnected"))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user