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
@@ -359,9 +359,14 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
} else {
storedRoomsToAwait = [roomID]
}
handleAppRoute(.room(roomID: roomID, via: []))
} else if appSettings.threadsEnabled, let threadRootEventID = content.threadRootEventID {
handleAppRoute(.thread(roomID: roomID, threadRootEventID: threadRootEventID, focusEventID: content.eventID))
} else if let eventID = content.eventID {
handleAppRoute(.event(eventID: eventID, roomID: roomID, via: []))
} else {
handleAppRoute(.room(roomID: roomID, via: []))
}
handleAppRoute(.room(roomID: roomID, via: []))
}
func handleInlineReply(_ service: NotificationManagerProtocol, content: UNNotificationContent, replyText: String) async {
@@ -51,6 +51,8 @@ enum AppRoute: Hashable {
case share(ShareExtensionPayload)
/// The change roles screen of a room with the transfer ownership setting
case transferOwnership(roomID: String)
/// A thread within a room, only to be used to handle tap on notification for threaded events.
case thread(roomID: String, threadRootEventID: String, focusEventID: String?)
/// Whether or not the route should be handled by the authentication flow.
var isAuthenticationRoute: Bool {