mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Introduce dueToTooManyErrors parameter
This commit is contained in:
@@ -65,8 +65,8 @@ extension EnterPinCodeCoordinator: EnterPinCodeViewModelCoordinatorDelegate {
|
||||
self.delegate?.enterPinCodeCoordinatorDidComplete(self)
|
||||
}
|
||||
|
||||
func enterPinCodeViewModelDidCompleteWithReset(_ viewModel: EnterPinCodeViewModelType) {
|
||||
self.delegate?.enterPinCodeCoordinatorDidCompleteWithReset(self)
|
||||
func enterPinCodeViewModelDidCompleteWithReset(_ viewModel: EnterPinCodeViewModelType, dueToTooManyErrors: Bool) {
|
||||
self.delegate?.enterPinCodeCoordinatorDidCompleteWithReset(self, dueToTooManyErrors: dueToTooManyErrors)
|
||||
}
|
||||
|
||||
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didCompleteWithPin pin: String) {
|
||||
|
||||
@@ -20,7 +20,7 @@ import Foundation
|
||||
|
||||
protocol EnterPinCodeCoordinatorDelegate: class {
|
||||
func enterPinCodeCoordinatorDidComplete(_ coordinator: EnterPinCodeCoordinatorType)
|
||||
func enterPinCodeCoordinatorDidCompleteWithReset(_ coordinator: EnterPinCodeCoordinatorType)
|
||||
func enterPinCodeCoordinatorDidCompleteWithReset(_ coordinator: EnterPinCodeCoordinatorType, dueToTooManyErrors: Bool)
|
||||
func enterPinCodeCoordinator(_ coordinator: EnterPinCodeCoordinatorType, didCompleteWithPin pin: String)
|
||||
func enterPinCodeCoordinatorDidCancel(_ coordinator: EnterPinCodeCoordinatorType)
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
|
||||
// go back to first state
|
||||
self.update(viewState: .choosePin)
|
||||
case .forgotPinAlertResetAction:
|
||||
self.coordinatorDelegate?.enterPinCodeViewModelDidCompleteWithReset(self)
|
||||
self.coordinatorDelegate?.enterPinCodeViewModelDidCompleteWithReset(self, dueToTooManyErrors: false)
|
||||
case .forgotPinAlertCancelAction:
|
||||
// no-op
|
||||
break
|
||||
@@ -146,7 +146,7 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
|
||||
pinCodePreferences.numberOfPinFailures += 1
|
||||
if viewMode == .unlock && localAuthenticationService.shouldLogOutUser() {
|
||||
// log out user
|
||||
self.coordinatorDelegate?.enterPinCodeViewModelDidCompleteWithReset(self)
|
||||
self.coordinatorDelegate?.enterPinCodeViewModelDidCompleteWithReset(self, dueToTooManyErrors: true)
|
||||
return
|
||||
}
|
||||
if numberOfFailuresDuringEnterPIN < pinCodePreferences.allowedNumberOfTrialsBeforeAlert {
|
||||
|
||||
@@ -26,7 +26,7 @@ protocol EnterPinCodeViewModelViewDelegate: class {
|
||||
|
||||
protocol EnterPinCodeViewModelCoordinatorDelegate: class {
|
||||
func enterPinCodeViewModelDidComplete(_ viewModel: EnterPinCodeViewModelType)
|
||||
func enterPinCodeViewModelDidCompleteWithReset(_ viewModel: EnterPinCodeViewModelType)
|
||||
func enterPinCodeViewModelDidCompleteWithReset(_ viewModel: EnterPinCodeViewModelType, dueToTooManyErrors: Bool)
|
||||
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didCompleteWithPin pin: String)
|
||||
func enterPinCodeViewModelDidCancel(_ viewModel: EnterPinCodeViewModelType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user