From d0611bfa49cb2cfade294807413359efdd7421a3 Mon Sep 17 00:00:00 2001 From: Daniel Prows Date: Tue, 8 Aug 2023 16:11:05 -0600 Subject: [PATCH] update example --- examples/counter/main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/counter/main.go b/examples/counter/main.go index 6cecc51..7294afa 100644 --- a/examples/counter/main.go +++ b/examples/counter/main.go @@ -50,7 +50,7 @@ func setup(client *streamdeck.Client) { settings := make(map[string]*Settings) action.RegisterHandler(streamdeck.WillAppear, func(ctx context.Context, client *streamdeck.Client, event streamdeck.Event) error { - p := streamdeck.WillAppearPayload{} + p := streamdeck.WillAppearPayload[Settings]{} if err := json.Unmarshal(event.Payload, &p); err != nil { return err } @@ -61,9 +61,11 @@ func setup(client *streamdeck.Client) { settings[event.Context] = s } - if err := json.Unmarshal(p.Settings, s); err != nil { - return err - } + /* + if err := json.Unmarshal(p.Settings, s); err != nil { + return err + } + */ bg, err := streamdeck.Image(background()) if err != nil {