mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v3] bugfix/windows linux notifications (#4450)
* fix windows encoding --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
8d999ba34d
commit
48e3bd3dd4
2 changed files with 14 additions and 17 deletions
|
|
@ -23,6 +23,7 @@ After processing, the content will be moved to the main changelog and this file
|
|||
|
||||
## Fixed
|
||||
<!-- Bug fixes -->
|
||||
- Fixed notification parsing on Windows @popaprozac in [PR](https://github.com/wailsapp/wails/pull/4450)
|
||||
|
||||
## Deprecated
|
||||
<!-- Soon-to-be removed features -->
|
||||
|
|
|
|||
|
|
@ -177,13 +177,11 @@ func (wn *windowsNotifier) SendNotification(options NotificationOptions) error {
|
|||
ActivationArguments: DefaultActionIdentifier,
|
||||
}
|
||||
|
||||
if options.Data != nil {
|
||||
encodedPayload, err := wn.encodePayload(DefaultActionIdentifier, options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to encode notification payload: %w", err)
|
||||
}
|
||||
n.ActivationArguments = encodedPayload
|
||||
encodedPayload, err := wn.encodePayload(DefaultActionIdentifier, options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to encode notification payload: %w", err)
|
||||
}
|
||||
n.ActivationArguments = encodedPayload
|
||||
|
||||
return n.Push()
|
||||
}
|
||||
|
|
@ -232,20 +230,18 @@ func (wn *windowsNotifier) SendNotificationWithActions(options NotificationOptio
|
|||
})
|
||||
}
|
||||
|
||||
if options.Data != nil {
|
||||
encodedPayload, err := wn.encodePayload(n.ActivationArguments, options)
|
||||
encodedPayload, err := wn.encodePayload(n.ActivationArguments, options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to encode notification payload: %w", err)
|
||||
}
|
||||
n.ActivationArguments = encodedPayload
|
||||
|
||||
for index := range n.Actions {
|
||||
encodedPayload, err := wn.encodePayload(n.Actions[index].Arguments, options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to encode notification payload: %w", err)
|
||||
}
|
||||
n.ActivationArguments = encodedPayload
|
||||
|
||||
for index := range n.Actions {
|
||||
encodedPayload, err := wn.encodePayload(n.Actions[index].Arguments, options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to encode notification payload: %w", err)
|
||||
}
|
||||
n.Actions[index].Arguments = encodedPayload
|
||||
}
|
||||
n.Actions[index].Arguments = encodedPayload
|
||||
}
|
||||
|
||||
return n.Push()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue