ExternalKeyboard: Don't spam the "Keyboard connected" InfoMessage

Only show it for the first keyboard
reviewable/pr9739/r1
NiLuJe 2 years ago
parent 5b6d2ab66f
commit 53c0a65a5b

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

Loading…
Cancel
Save