1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-20 09:41:19 +00:00

Fix broken actions after config format change

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-06-06 22:41:10 +02:00
parent 74979e2672
commit 205d8110d0
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -167,11 +167,11 @@ func main() {
offTimer.Reset(userConfig.DisplayOffTime)
}
if evt.Key >= len(activePage.Keys) {
kd, ok := activePage.Keys[evt.Key]
if !ok {
continue
}
kd := activePage.Keys[evt.Key]
if kd.On == "down" && evt.Type == streamdeck.EventTypeDown || (kd.On == "up" || kd.On == "") && evt.Type == streamdeck.EventTypeUp || kd.On == "both" {
if err := triggerAction(kd); err != nil {
log.WithError(err).Error("Unable to execute action")