summary refs log tree commit diff
path: root/src/notifications/ManagerMac.mm
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2022-11-15 19:04:38 -0500
committerJoseph Donofry <joedonofry@gmail.com>2022-11-15 19:04:38 -0500
commit802ba78fea363134bd4215dc8ea0124bceb9b38d (patch)
tree8131d4e6cb132c312697d8c0ae925266b8938652 /src/notifications/ManagerMac.mm
parentChange margins because people nagged me (diff)
downloadnheko-802ba78fea363134bd4215dc8ea0124bceb9b38d.tar.xz
Only play macOS notification sounds when pushrules dictate it
Diffstat (limited to 'src/notifications/ManagerMac.mm')
-rw-r--r--src/notifications/ManagerMac.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/notifications/ManagerMac.mm b/src/notifications/ManagerMac.mm

index 4865e30d..39312465 100644 --- a/src/notifications/ManagerMac.mm +++ b/src/notifications/ManagerMac.mm
@@ -75,7 +75,8 @@ void NotificationsManager::objCxxPostNotification( const QString& bodyImagePath, const QString& respondStr, const QString& sendStr, - const QString& placeholder) + const QString& placeholder, + const bool enableSound) { // Request permissions for alerts (the generic type of notification), sound playback, // and badges (which allows the Nheko app icon to show the little red bubble with unread count). @@ -128,7 +129,9 @@ void NotificationsManager::objCxxPostNotification( content.title = title; content.subtitle = sub; content.body = body; - content.sound = [UNNotificationSound defaultSound]; + if (enableSound) { + content.sound = [UNNotificationSound defaultSound]; + } content.threadIdentifier = threadIdentifier; content.categoryIdentifier = @"ReplyCategory";