mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 20:38:41 +00:00
Be more lenient with fatalErrors coming out of equal transitions, caused by asynchronicity on the UI layer
This commit is contained in:
committed by
Stefan Ceriu
parent
d90d7adb21
commit
61326ed63a
@@ -277,9 +277,13 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
}
|
||||
|
||||
stateMachine.addErrorHandler { context in
|
||||
if context.fromState == context.toState {
|
||||
MXLog.error("Failed transition from equal states: \(context.fromState)")
|
||||
} else {
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func restoreUserSession() {
|
||||
Task {
|
||||
|
||||
@@ -254,9 +254,13 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
stateMachine.addErrorHandler { context in
|
||||
if context.fromState == context.toState {
|
||||
MXLog.error("Failed transition from equal states: \(context.fromState)")
|
||||
} else {
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Updates the navigation stack so it displays the timeline for the given room
|
||||
/// - Parameters:
|
||||
|
||||
@@ -209,9 +209,13 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
stateMachine.addErrorHandler { context in
|
||||
if context.fromState == context.toState {
|
||||
MXLog.error("Failed transition from equal states: \(context.fromState)")
|
||||
} else {
|
||||
fatalError("Failed transition with context: \(context)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func presentMigrationScreen() {
|
||||
// Listen for the first sync to finish.
|
||||
|
||||
Reference in New Issue
Block a user