Threaded notifications (#4644)

* implemented grouping

* implemented presenting the thread

* improved the implementation by reusing the presentation action

* add Thread group to DMs to differentiate from non threaded messages of the same DM

* name for a threaded notification in group room

* focus event when tapping on a notification

* pr suggestions

* document
This commit is contained in:
Mauro
2025-10-23 15:28:45 +02:00
committed by GitHub
parent 66f0ff0fdf
commit 7a1d4a08fb
16 changed files with 166 additions and 62 deletions
@@ -12,6 +12,7 @@ enum NotificationConstants {
enum UserInfoKey {
static let roomIdentifier = "room_id"
static let eventIdentifier = "event_id"
static let threadRootEventIdentifier = "thread_root_event_id"
static let unreadCount = "unread_count"
static let pusherNotificationClientIdentifier = "pusher_notification_client_identifier"
static let receiverIdentifier = "receiver_id"
@@ -77,6 +77,10 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
}
return nil
}
var threadRootEventID: String? {
notificationItem.threadId
}
}
struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
@@ -109,4 +113,6 @@ struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
var roomJoinedMembers: Int { 0 }
var hasMention: Bool { false }
var threadRootEventID: String? { nil }
}
@@ -36,6 +36,8 @@ protocol NotificationItemProxyProtocol {
var isNoisy: Bool { get }
var hasMention: Bool { get }
var threadRootEventID: String? { get }
}
extension NotificationItemProxyProtocol {