update example
This commit is contained in:
parent
afaa02f8b2
commit
d0611bfa49
@ -50,7 +50,7 @@ func setup(client *streamdeck.Client) {
|
|||||||
settings := make(map[string]*Settings)
|
settings := make(map[string]*Settings)
|
||||||
|
|
||||||
action.RegisterHandler(streamdeck.WillAppear, func(ctx context.Context, client *streamdeck.Client, event streamdeck.Event) error {
|
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 {
|
if err := json.Unmarshal(event.Payload, &p); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -61,9 +61,11 @@ func setup(client *streamdeck.Client) {
|
|||||||
settings[event.Context] = s
|
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())
|
bg, err := streamdeck.Image(background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user