mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fixes #2470 - Allow verifiying a session through entering the recovery key
This commit is contained in:
committed by
Stefan Ceriu
parent
46f0cf45bd
commit
023e10edf2
+5
-2
@@ -31,12 +31,13 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess
|
||||
}
|
||||
|
||||
init(sessionVerificationControllerProxy: SessionVerificationControllerProxyProtocol,
|
||||
initialState: SessionVerificationScreenViewState = SessionVerificationScreenViewState()) {
|
||||
recoveryState: SecureBackupRecoveryState,
|
||||
verificationState: SessionVerificationScreenStateMachine.State = .initial) {
|
||||
self.sessionVerificationControllerProxy = sessionVerificationControllerProxy
|
||||
|
||||
stateMachine = SessionVerificationScreenStateMachine()
|
||||
|
||||
super.init(initialViewState: initialState)
|
||||
super.init(initialViewState: .init(showRecoveryOption: recoveryState == .incomplete, verificationState: verificationState))
|
||||
|
||||
setupStateMachine()
|
||||
|
||||
@@ -70,6 +71,8 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess
|
||||
|
||||
override func process(viewAction: SessionVerificationScreenViewAction) {
|
||||
switch viewAction {
|
||||
case .recoveryKey:
|
||||
actionsSubject.send(.recoveryKey)
|
||||
case .requestVerification:
|
||||
stateMachine.processEvent(.requestVerification)
|
||||
case .startSasVerification:
|
||||
|
||||
Reference in New Issue
Block a user