From 383a538a0a6aaab50abd090eb9d3f59b32069e4d Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Fri, 6 Sep 2024 09:51:44 +0300 Subject: [PATCH] Fix unfinished comment about onboarding flow verification state listening. --- .../FlowCoordinators/OnboardingFlowCoordinator.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ElementX/Sources/FlowCoordinators/OnboardingFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/OnboardingFlowCoordinator.swift index 4fb675f28..4ad28a7cc 100644 --- a/ElementX/Sources/FlowCoordinators/OnboardingFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/OnboardingFlowCoordinator.swift @@ -86,8 +86,11 @@ class OnboardingFlowCoordinator: FlowCoordinatorProtocol { stateMachine = .init(state: .initial) - // Always react to verification changes, not only when freshly - // verified from + // Verification can change as part of the onboarding flow by verifying with + // another device, using a recovery key or by resetting one's crypto identity. + // It can also happen that onboarding started before it had a chance to update, + // usually seen when registering a new account. + // Handle all those cases here instead of spreading them throughout the code. verificationStateCancellable = userSession.sessionSecurityStatePublisher .map(\.verificationState) .removeDuplicates()