Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Fix the error in the event Badge #397

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dock.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (d *Dock) SetBadge(badge string) (err error) {
if err = d.ctx.Err(); err != nil {
return
}
_, err = synchronousEvent(d.ctx, d, d.w, Event{Name: eventNameDockCmdSetBadge, TargetID: d.id, Badge: badge}, eventNameDockEventBadgeSet)
_, err = synchronousEvent(d.ctx, d, d.w, Event{Name: eventNameDockCmdSetBadge, TargetID: d.id, Badge: &badge}, eventNameDockEventBadgeSet)
return
}

Expand Down
2 changes: 1 addition & 1 deletion event.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Event struct {
// A choice was made not to use interfaces since it's a pain in the ass asserting each an every payload afterwards
// We use pointers so that omitempty works
AuthInfo *EventAuthInfo `json:"authInfo,omitempty"`
Badge string `json:"badge,omitempty"`
Badge *string `json:"badge,omitempty"`
BounceType string `json:"bounceType,omitempty"`
Bounds *RectangleOptions `json:"bounds,omitempty"`
CallbackID string `json:"callbackId,omitempty"`
Expand Down