|
|
@ -115,13 +115,15 @@ final class NotificationServiceExtension : UNNotificationServiceExtension {
|
|
|
|
if let notificationType = notificationPreference?.notificationPreviewType() {
|
|
|
|
if let notificationType = notificationPreference?.notificationPreviewType() {
|
|
|
|
switch notificationType {
|
|
|
|
switch notificationType {
|
|
|
|
case .nameNoPreview:
|
|
|
|
case .nameNoPreview:
|
|
|
|
notificationContent.body = "New Message!"
|
|
|
|
notificationContent.body = "New Message"
|
|
|
|
case .noNameNoPreview:
|
|
|
|
case .noNameNoPreview:
|
|
|
|
notificationContent.title = ""
|
|
|
|
notificationContent.title = ""
|
|
|
|
notificationContent.body = "New Message!"
|
|
|
|
notificationContent.body = "New Message"
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
notificationContent.body = newNotificationBody
|
|
|
|
notificationContent.body = newNotificationBody
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notificationContent.body = newNotificationBody
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if notificationContent.body.count < 1 {
|
|
|
|
if notificationContent.body.count < 1 {
|
|
|
|