Minor refactoring

This commit is contained in:
Niels Andriesse 2020-09-23 16:29:58 +10:00
parent ab74bd2b34
commit 9dfdee6fb0
1 changed files with 4 additions and 2 deletions

View File

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