mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user