Define the notification sound name in AppSettings. (#5106)

This commit is contained in:
Doug
2026-02-13 16:36:45 +00:00
committed by GitHub
parent 8f9d507e28
commit 9207f004b0
6 changed files with 10 additions and 3 deletions
@@ -231,7 +231,7 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
let content = UNMutableNotificationContent()
content.body = L10n.notificationReceivedWhileOfflineIos
content.badge = originalRequest.content.unreadCount as NSNumber?
content.sound = .init(named: .init("message.caf"))
content.sound = .init(named: settings.notificationSoundName.publisher.value)
let request = UNNotificationRequest(identifier: Self.receivedWhileOfflineNotificationID, content: content, trigger: nil)
UNUserNotificationCenter.current().add(request)