From 7f8c952c66b9dd18eb5ff889c8f178690d112857 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Wed, 16 Feb 2022 16:18:49 +1100 Subject: [PATCH] fix notification badge --- .../NotificationServiceExtension.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SessionNotificationServiceExtension/NotificationServiceExtension.swift b/SessionNotificationServiceExtension/NotificationServiceExtension.swift index 7ab3327ab..a52e672ff 100644 --- a/SessionNotificationServiceExtension/NotificationServiceExtension.swift +++ b/SessionNotificationServiceExtension/NotificationServiceExtension.swift @@ -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: