Reset Recovery Key Screen (#2648)

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
Mauro
2024-04-04 18:14:22 +02:00
committed by GitHub
parent 97d9189077
commit 023b7fc608
32 changed files with 458 additions and 37 deletions
@@ -51,18 +51,20 @@ final class SecureBackupScreenCoordinator: CoordinatorProtocol {
recoveryKeyCoordinator.actions.sink { [weak self] action in
guard let self else { return }
parameters.navigationStackCoordinator?.setSheetCoordinator(nil)
switch action {
case .cancel:
break
case .recoverySetUp:
showSuccessIndicator(title: L10n.screenRecoveryKeySetupSuccess)
parameters.navigationStackCoordinator?.setSheetCoordinator(nil)
case .recoveryChanged:
showSuccessIndicator(title: L10n.screenRecoveryKeyChangeSuccess)
parameters.navigationStackCoordinator?.setSheetCoordinator(nil)
case .recoveryFixed:
showSuccessIndicator(title: L10n.screenRecoveryKeyConfirmSuccess)
parameters.navigationStackCoordinator?.setSheetCoordinator(nil)
case .showResetKeyInfo:
showResetRecoveryKeyScreen(navigationStackCoordinator: navigationStackCoordinator)
}
}
.store(in: &cancellables)
@@ -105,4 +107,16 @@ final class SecureBackupScreenCoordinator: CoordinatorProtocol {
iconName: "checkmark",
persistent: false))
}
private func showResetRecoveryKeyScreen(navigationStackCoordinator: NavigationStackCoordinator) {
let coordinator = ResetRecoveryKeyScreenCoordinator()
coordinator.actionsPublisher.sink { action in
switch action {
case .cancel:
navigationStackCoordinator.setSheetCoordinator(nil)
}
}
.store(in: &cancellables)
navigationStackCoordinator.setSheetCoordinator(coordinator)
}
}