- Rename `cv` to `chatView` in chatview constructor - Rename `bm` to `bitmap` in QR code rendering - Rename `n` to `notification` in desktop notifications - Rename `p` to `padding` in UI configuration These changes make the code more self-documenting and easier to understand by using descriptive variable names instead of abbreviated ones.
19 lines
421 B
Go
19 lines
421 B
Go
//go:build darwin
|
|
|
|
package notifications
|
|
|
|
import (
|
|
gosxnotifier "github.com/deckarep/gosx-notifier"
|
|
)
|
|
|
|
func sendDesktopNotification(title string, message string, image string, playSound bool, _ int) error {
|
|
notification := gosxnotifier.NewNotification(message)
|
|
notification.Title = title
|
|
notification.ContentImage = image
|
|
|
|
if playSound {
|
|
notification.Sound = gosxnotifier.Default
|
|
}
|
|
|
|
return notification.Push()
|
|
}
|