Make showBiometricsRequestIfNeeded method public

This commit is contained in:
Alexey Gerasimov 2018-10-22 15:48:03 +03:00
parent 5c4ba04e2c
commit 77309f0b77
1 changed files with 11 additions and 10 deletions

View File

@ -150,16 +150,6 @@ open class BasePassCodeViewController: UIViewController, LegacyConfigurableContr
}
}
private func showBiometricsRequestIfNeeded() {
guard viewModel.isBiometricsEnabled && viewModel.controllerType == .enter else {
return
}
viewModel.authenticateUsingBiometrics(with: biometricsAuthorizationHint,
fallback: biometricsFallbackButtonTitle,
cancel: biometricsCancelButtonTitle)
}
private func resetUI() {
resetDotsUI()
viewModel.reset()
@ -251,6 +241,17 @@ open class BasePassCodeViewController: UIViewController, LegacyConfigurableContr
fakeTextField.resignFirstResponder()
}
/// Show biometrics system UI if applicable
func showBiometricsRequestIfNeeded() {
guard viewModel.isBiometricsEnabled && viewModel.operationType == .enter else {
return
}
viewModel.authenticateUsingBiometrics(with: biometricsAuthorizationHint,
fallback: biometricsFallbackButtonTitle,
cancel: biometricsCancelButtonTitle)
}
// MARK: - ConfigurableController
open func bindViews() {