fix notification badge

This commit is contained in:
Ryan Zhao 2022-02-16 16:18:49 +11:00
parent 37edce9a09
commit 7f8c952c66
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
return self.completeSilenty()
}
notificationContent.userInfo = userInfo
notificationContent.badge = 1
notificationContent.badge = NSNumber(value: OWSMessageUtils.sharedManager().unreadMessagesCount() + 1)
let notificationsPreference = Environment.shared.preferences!.notificationPreviewType()
switch notificationsPreference {
case .namePreview: