Fix #155
This commit is contained in:
parent
374c6c8c10
commit
a0ecc6c0e4
2 changed files with 53 additions and 48 deletions
|
|
@ -13,7 +13,7 @@ import PasscodeLock
|
|||
import LocalAuthentication
|
||||
import passKit
|
||||
|
||||
class SettingsTableViewController: UITableViewController {
|
||||
class SettingsTableViewController: UITableViewController, UITabBarControllerDelegate {
|
||||
|
||||
lazy var touchIDSwitch: UISwitch = {
|
||||
let uiSwitch = UISwitch(frame: CGRect.zero)
|
||||
|
|
@ -29,6 +29,10 @@ class SettingsTableViewController: UITableViewController {
|
|||
let passwordStore = PasswordStore.shared
|
||||
var passcodeLockConfig = PasscodeLockConfiguration.shared
|
||||
|
||||
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
|
||||
navigationController?.popViewController(animated: true)
|
||||
}
|
||||
|
||||
@IBAction func savePGPKey(segue: UIStoryboardSegue) {
|
||||
if let controller = segue.source as? PGPKeySettingTableViewController {
|
||||
SharedDefaults[.pgpPrivateKeyURL] = URL(string: controller.pgpPrivateKeyURLTextField.text!)
|
||||
|
|
@ -132,6 +136,7 @@ class SettingsTableViewController: UITableViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
tabBarController!.delegate = self
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(SettingsTableViewController.actOnPasswordStoreErasedNotification), name: .passwordStoreErased, object: nil)
|
||||
self.passwordRepositoryTableViewCell.detailTextLabel?.text = SharedDefaults[.gitURL]?.host
|
||||
touchIDTableViewCell.accessoryView = touchIDSwitch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue