Revert "Open the room live when tapping the notification for its newest message"

This reverts commit 4c71cae0f.

Comparing against other delivered notifications doesn't reflect the timeline:
in rooms set to mentions and keywords, after swiping away newer notifications
or with messages sent from another device, newer messages can exist without a
notification, so the room opened live with the tapped event out of view.
This commit is contained in:
Stefan Ceriu
2026-10-02 15:22:48 +03:00
parent a50c80c179
commit 52b411e954
6 changed files with 14 additions and 50 deletions
@@ -413,7 +413,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
return !userSessionFlowCoordinator.isDisplayingRoomScreen(withRoomID: roomID)
}
func notificationTapped(content: UNNotificationContent, isNewestInRoom: Bool) async {
func notificationTapped(content: UNNotificationContent) async {
MXLog.info("Tapped Notification")
guard let roomID = content.roomID,
@@ -431,12 +431,11 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
handleAppRoute(.room(roomID: roomID, via: []), windowType: nil)
} else if appSettings.threadsEnabled, let threadRootEventID = content.threadRootEventID {
handleAppRoute(.thread(roomID: roomID, threadRootEventID: threadRootEventID, focusEventID: eventID), windowType: nil)
} else if let eventID, !isNewestInRoom {
} else if let eventID {
// Only track main timeline event deeplinking
analyticsService.signpost.startTransaction(.notificationToMessage)
handleAppRoute(.event(eventID: eventID, roomID: roomID, via: []), windowType: nil)
} else {
// The live timeline already ends with the newest message, so there's no need to focus on it.
handleAppRoute(.room(roomID: roomID, via: []), windowType: nil)
}
}