Skip to content

Commit

Permalink
Optimization of the pass lock screen. Remove of the bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegGordiichuk authored and Michael Scoff committed Jan 8, 2018
1 parent c228a7c commit 37e2521
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
3 changes: 0 additions & 3 deletions Trust/Core/Initializers/TouchRegistrar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ class TouchRegistrar {
passcodeAttemptLimit: 5,
splashViewControllerClass: SplashViewController.self
)
VENTouchLock.sharedInstance().backgroundLockVisible = true
VENTouchLockAppearance().splashShouldEmbedInNavigationController = true
VENTouchLockAppearance().touchIDCancelPresentsPasscodeViewController = false
}

func unregister() {
Expand Down
5 changes: 3 additions & 2 deletions Trust/Settings/ViewControllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ class SettingsViewController: FormViewController {
row.value = result
row.updateCell()
}
VENTouchLock.setShouldUseTouchID(true)
VENTouchLock.sharedInstance().backgroundLockVisible = false
if VENTouchLock.canUseTouchID() {
VENTouchLock.setShouldUseTouchID(true)
}
} else {
VENTouchLock.sharedInstance().deletePasscode()
}
Expand Down
17 changes: 11 additions & 6 deletions Trust/Settings/ViewControllers/SplashViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ import VENTouchLock
class SplashViewController: VENTouchLockSplashViewController {

let label = UILabel()


override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
self.setIsSnapshot(true)
}

required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -30,6 +39,7 @@ class SplashViewController: VENTouchLockSplashViewController {
label.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor),
label.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor),
])
self.showUnlock(animated: true)
}

override func dismiss(withUnlockSuccess success: Bool, unlockType: VENTouchLockSplashViewControllerUnlockType, animated: Bool) {
Expand Down Expand Up @@ -83,9 +93,4 @@ class SplashViewController: VENTouchLockSplashViewController {
label.text = error.errorDescription
}
}

override func setIsSnapshot(_ isSnapshotViewController: Bool) {
transition(to: .new)
return super.setIsSnapshot(isSnapshotViewController)
}
}

0 comments on commit 37e2521

Please sign in to comment.