mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Await for room sync only for push notification invites (#3307)
This commit is contained in:
@@ -32,7 +32,8 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
private var userSession: UserSessionProtocol? {
|
||||
didSet {
|
||||
userSessionObserver?.cancel()
|
||||
if userSession != nil {
|
||||
if let userSession {
|
||||
userSession.clientProxy.roomsToAwait = storedRoomsToAwait
|
||||
configureElementCallService()
|
||||
configureNotificationManager()
|
||||
observeUserSessionChanges()
|
||||
@@ -57,6 +58,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
|
||||
private let appRouteURLParser: AppRouteURLParser
|
||||
@Consumable private var storedAppRoute: AppRoute?
|
||||
private var storedRoomsToAwait: Set<String> = []
|
||||
|
||||
init(appDelegate: AppDelegate) {
|
||||
let appHooks = AppHooks()
|
||||
@@ -303,6 +305,14 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
return
|
||||
}
|
||||
|
||||
if content.categoryIdentifier == NotificationConstants.Category.invite {
|
||||
if let userSession {
|
||||
userSession.clientProxy.roomsToAwait.insert(roomID)
|
||||
} else {
|
||||
storedRoomsToAwait.insert(roomID)
|
||||
}
|
||||
}
|
||||
|
||||
handleAppRoute(.room(roomID: roomID, via: []))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user