mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +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
|
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)")
|
fatalError("Failed transition with context: \(context)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func restoreUserSession() {
|
private func restoreUserSession() {
|
||||||
Task {
|
Task {
|
||||||
|
|||||||
@@ -254,9 +254,13 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stateMachine.addErrorHandler { context in
|
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)")
|
fatalError("Failed transition with context: \(context)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Updates the navigation stack so it displays the timeline for the given room
|
/// Updates the navigation stack so it displays the timeline for the given room
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
|
|||||||
@@ -209,9 +209,13 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stateMachine.addErrorHandler { context in
|
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)")
|
fatalError("Failed transition with context: \(context)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func presentMigrationScreen() {
|
private func presentMigrationScreen() {
|
||||||
// Listen for the first sync to finish.
|
// Listen for the first sync to finish.
|
||||||
|
|||||||
Reference in New Issue
Block a user