mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Hide cancel button if pin forced
This commit is contained in:
@@ -280,4 +280,12 @@ extension EnterPinCodeViewController: EnterPinCodeViewModelViewDelegate {
|
||||
self.renderPlaceholdersCount(count)
|
||||
}
|
||||
|
||||
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdateCancelButtonHidden isHidden: Bool) {
|
||||
if isHidden {
|
||||
hideCancelButton()
|
||||
} else {
|
||||
showCancelButton()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
|
||||
switch viewMode {
|
||||
case .setPin:
|
||||
update(viewState: .choosePin)
|
||||
self.viewDelegate?.enterPinCodeViewModel(self, didUpdateCancelButtonHidden: pinCodePreferences.forcePinProtection)
|
||||
case .unlock:
|
||||
update(viewState: .unlock)
|
||||
case .confirmPinToDeactivate:
|
||||
|
||||
@@ -21,6 +21,7 @@ import Foundation
|
||||
protocol EnterPinCodeViewModelViewDelegate: class {
|
||||
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdateViewState viewSate: EnterPinCodeViewState)
|
||||
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdatePlaceholdersCount count: Int)
|
||||
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdateCancelButtonHidden isHidden: Bool)
|
||||
}
|
||||
|
||||
protocol EnterPinCodeViewModelCoordinatorDelegate: class {
|
||||
|
||||
Reference in New Issue
Block a user