MCPcopy Create free account
hub / github.com/efogdev/mpris-timer / Notify

Function Notify

internal/ui/notify.go:13–27  ·  view source on GitHub ↗
(title string, text string)

Source from the content-addressed store, hash-verified

11)
12
13func 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
29func sendNotification(app *adw.Application, title string, text string) {
30 id, _ := uuid.NewV7()

Callers 1

mainFunction · 0.92

Calls 1

sendNotificationFunction · 0.85

Tested by

no test coverage detected