Fix passcode lock touch ID again
This commit is contained in:
parent
90a675d4fa
commit
7640d55317
2 changed files with 3 additions and 3 deletions
|
|
@ -163,7 +163,7 @@ class SettingsTableViewController: UITableViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func setPasscodeLockTouchIDCells() {
|
private func setPasscodeLockTouchIDCells() {
|
||||||
if PasscodeLockConfiguration.shared.repository.hasPasscode {
|
if passcodeLockConfig.repository.hasPasscode {
|
||||||
self.passcodeTableViewCell.detailTextLabel?.text = "On"
|
self.passcodeTableViewCell.detailTextLabel?.text = "On"
|
||||||
passcodeLockConfig.isTouchIDAllowed = SharedDefaults[.isTouchIDOn]
|
passcodeLockConfig.isTouchIDAllowed = SharedDefaults[.isTouchIDOn]
|
||||||
touchIDSwitch.isOn = SharedDefaults[.isTouchIDOn]
|
touchIDSwitch.isOn = SharedDefaults[.isTouchIDOn]
|
||||||
|
|
@ -214,7 +214,7 @@ class SettingsTableViewController: UITableViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
func touchIDSwitchAction(uiSwitch: UISwitch) {
|
func touchIDSwitchAction(uiSwitch: UISwitch) {
|
||||||
if !PasscodeLockConfiguration.shared.repository.hasPasscode || !isTouchIDEnabled() {
|
if !passcodeLockConfig.repository.hasPasscode || !isTouchIDEnabled() {
|
||||||
// switch off
|
// switch off
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500)) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500)) {
|
||||||
uiSwitch.isOn = SharedDefaults[.isTouchIDOn] // SharedDefaults[.isTouchIDOn] should be false
|
uiSwitch.isOn = SharedDefaults[.isTouchIDOn] // SharedDefaults[.isTouchIDOn] should be false
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import PasscodeLock
|
import PasscodeLock
|
||||||
|
|
||||||
public struct PasscodeLockConfiguration: PasscodeLockConfigurationType {
|
public class PasscodeLockConfiguration: PasscodeLockConfigurationType {
|
||||||
|
|
||||||
public static let shared = PasscodeLockConfiguration()
|
public static let shared = PasscodeLockConfiguration()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue