mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix compilation errors - make sure we update the push notification badge using the received, server-provided unread count.
This commit is contained in:
@@ -43,7 +43,9 @@ class NotificationHandler {
|
||||
MXLog.info("\(tag) Processing event: \(eventID) in room: \(roomID)")
|
||||
|
||||
// Copy over the unread information to the notification badge
|
||||
notificationContent.badge = NSNumber(value: notificationContent.unreadCount)
|
||||
if let unreadCount = notificationContent.unreadCount {
|
||||
notificationContent.badge = NSNumber(value: unreadCount)
|
||||
}
|
||||
|
||||
guard let notificationItemProxy = await userSession.notificationItemProxy(roomID: roomID, eventID: eventID) else {
|
||||
MXLog.error("\(tag) Failed retrieving notification item")
|
||||
|
||||
Reference in New Issue
Block a user