mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Await user session migrations rather than launching a task. (#4502)
Fixes a bug where they would be run *after* startSync had been called, and expiring the sessions stopped the sync.
This commit is contained in:
@@ -38,7 +38,6 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
configureNotificationManager()
|
configureNotificationManager()
|
||||||
observeUserSessionChanges()
|
observeUserSessionChanges()
|
||||||
startSync()
|
startSync()
|
||||||
Task { await performUserSessionMigrations(userSession) }
|
|
||||||
Task { await appHooks.configure(with: userSession) }
|
Task { await appHooks.configure(with: userSession) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -568,6 +567,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
Task {
|
Task {
|
||||||
switch await userSessionStore.restoreUserSession() {
|
switch await userSessionStore.restoreUserSession() {
|
||||||
case .success(let userSession):
|
case .success(let userSession):
|
||||||
|
await self.performUserSessionMigrations(userSession)
|
||||||
self.userSession = userSession
|
self.userSession = userSession
|
||||||
stateMachine.processEvent(.createdUserSession)
|
stateMachine.processEvent(.createdUserSession)
|
||||||
case .failure:
|
case .failure:
|
||||||
|
|||||||
Reference in New Issue
Block a user