From 77309f0b775307544934b3ae79288d65ff8b8446 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Mon, 22 Oct 2018 15:48:03 +0300 Subject: [PATCH] Make showBiometricsRequestIfNeeded method public --- .../View/BasePassCodeViewController.swift | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift index 4a8e378..ffd8598 100644 --- a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift +++ b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift @@ -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() {