5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-19 02:19:31 +08:00

rewrite and simplify linux impl

This commit is contained in:
popaprozac 2025-03-22 22:36:29 -07:00
parent ace4f70e3a
commit 448c78b226
2 changed files with 433 additions and 650 deletions

File diff suppressed because it is too large Load Diff

View File

@ -141,7 +141,7 @@ func (wn *windowsNotifier) CheckNotificationAuthorization() (bool, error) {
} }
// SendNotification sends a basic notification with a name, title, and body. All other options are ignored on Windows. // SendNotification sends a basic notification with a name, title, and body. All other options are ignored on Windows.
// (subtitle is only available on macOS) // (subtitle is only available on macOS and Linux)
func (wn *windowsNotifier) SendNotification(options NotificationOptions) error { func (wn *windowsNotifier) SendNotification(options NotificationOptions) error {
if err := wn.saveIconToDir(); err != nil { if err := wn.saveIconToDir(); err != nil {
fmt.Printf("Error saving icon: %v\n", err) fmt.Printf("Error saving icon: %v\n", err)
@ -167,7 +167,7 @@ func (wn *windowsNotifier) SendNotification(options NotificationOptions) error {
// SendNotificationWithActions sends a notification with additional actions and inputs. // SendNotificationWithActions sends a notification with additional actions and inputs.
// A NotificationCategory must be registered with RegisterNotificationCategory first. The `CategoryID` must match the registered category. // A NotificationCategory must be registered with RegisterNotificationCategory first. The `CategoryID` must match the registered category.
// If a NotificationCategory is not registered a basic notification will be sent. // If a NotificationCategory is not registered a basic notification will be sent.
// (subtitle is only available on macOS) // (subtitle is only available on macOS and Linux)
func (wn *windowsNotifier) SendNotificationWithActions(options NotificationOptions) error { func (wn *windowsNotifier) SendNotificationWithActions(options NotificationOptions) error {
if err := wn.saveIconToDir(); err != nil { if err := wn.saveIconToDir(); err != nil {
fmt.Printf("Error saving icon: %v\n", err) fmt.Printf("Error saving icon: %v\n", err)