Minor refactoring

pull/281/head
Niels Andriesse 4 years ago
parent ab74bd2b34
commit 9dfdee6fb0

@ -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 {

Loading…
Cancel
Save