(title string, text string)
| 11 | ) |
| 12 | |
| 13 | func Notify(title string, text string) { |
| 14 | log.Printf("notify: %s", title) |
| 15 | |
| 16 | if !core.Overrides.UseUI { |
| 17 | sendNotification(core.App, title, text) |
| 18 | } else { |
| 19 | nApp := adw.NewApplication(core.AppId, gio.ApplicationNonUnique) |
| 20 | nApp.ConnectActivate(func() { |
| 21 | sendNotification(nApp, title, text) |
| 22 | }) |
| 23 | |
| 24 | _ = nApp.Register(context.Background()) |
| 25 | nApp.Run(nil) |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func sendNotification(app *adw.Application, title string, text string) { |
| 30 | id, _ := uuid.NewV7() |
no test coverage detected