Change view state name

This commit is contained in:
ismailgulek 2020-09-17 15:58:25 +03:00
parent 7e085c9e11
commit 754db0415a
3 changed files with 5 additions and 5 deletions

View file

@ -190,8 +190,8 @@ final class EnterPinCodeViewController: UIViewController {
switch viewState {
case .choosePin:
self.renderChoosePin()
case .blockedPin:
self.renderBlockedPin()
case .notAllowedPin:
self.renderNotAllowedPin()
case .confirmPin:
self.renderConfirmPin()
case .pinsDontMatch:
@ -220,7 +220,7 @@ final class EnterPinCodeViewController: UIViewController {
self.blockedPinView.isHidden = true
}
private func renderBlockedPin() {
private func renderNotAllowedPin() {
self.inactiveView.isHidden = true
self.mainStackView.isHidden = false
self.logoImageView.isHidden = true

View file

@ -116,7 +116,7 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
// check if this PIN is allowed
if pinCodePreferences.notAllowedPINs.contains(currentPin) {
viewMode = .notAllowedPin
update(viewState: .blockedPin)
update(viewState: .notAllowedPin)
return
}
// go to next screen

View file

@ -21,7 +21,7 @@ import Foundation
/// EnterPinCodeViewController view state
enum EnterPinCodeViewState {
case choosePin // creating pin for the first time, enter for first
case blockedPin // creating pin for the first time, provided pin is blocked
case notAllowedPin // creating pin for the first time, provided pin is not allowed
case confirmPin // creating pin for the first time, confirm
case pinsDontMatch // pins don't match
case unlock // after pin has been set, enter pin to unlock