mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Add boot detection in the NSE and use this to inform the user that there may be more notifications. (#5054)
* Add an initial implementation of the receivedWhileOfflineNotification. * Only deliver a single receivedWhileOffline notification per boot and clarify the API. * Add a 15-minute threshold for the receiveWhileOfflineNotification.
This commit is contained in:
@@ -29,6 +29,10 @@ extension UNNotificationContent {
|
||||
@objc var threadRootEventID: String? {
|
||||
userInfo[NotificationConstants.UserInfoKey.threadRootEventIdentifier] as? String
|
||||
}
|
||||
|
||||
var unreadCount: Int? {
|
||||
userInfo[NotificationConstants.UserInfoKey.unreadCount] as? Int
|
||||
}
|
||||
}
|
||||
|
||||
extension UNMutableNotificationContent {
|
||||
@@ -40,7 +44,7 @@ extension UNMutableNotificationContent {
|
||||
userInfo[NotificationConstants.UserInfoKey.receiverIdentifier] = newValue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override var roomID: String? {
|
||||
get {
|
||||
userInfo[NotificationConstants.UserInfoKey.roomIdentifier] as? String
|
||||
@@ -67,8 +71,4 @@ extension UNMutableNotificationContent {
|
||||
userInfo[NotificationConstants.UserInfoKey.threadRootEventIdentifier] = newValue
|
||||
}
|
||||
}
|
||||
|
||||
var unreadCount: Int? {
|
||||
userInfo[NotificationConstants.UserInfoKey.unreadCount] as? Int
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user