mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Make sure we update the push notification badge using the received, server-provided unread count.
This commit is contained in:
@@ -42,6 +42,9 @@ class NotificationHandler {
|
|||||||
func processEvent(_ eventID: String, roomID: String) async {
|
func processEvent(_ eventID: String, roomID: String) async {
|
||||||
MXLog.info("\(tag) Processing event: \(eventID) in room: \(roomID)")
|
MXLog.info("\(tag) Processing event: \(eventID) in room: \(roomID)")
|
||||||
|
|
||||||
|
// Copy over the unread information to the notification badge
|
||||||
|
notificationContent.badge = NSNumber(value: notificationContent.unreadCount)
|
||||||
|
|
||||||
guard let notificationItemProxy = await userSession.notificationItemProxy(roomID: roomID, eventID: eventID) else {
|
guard let notificationItemProxy = await userSession.notificationItemProxy(roomID: roomID, eventID: eventID) else {
|
||||||
MXLog.error("\(tag) Failed retrieving notification item")
|
MXLog.error("\(tag) Failed retrieving notification item")
|
||||||
discardNotification()
|
discardNotification()
|
||||||
|
|||||||
Reference in New Issue
Block a user