From ab8eaaf97c47f57709df729f33c0ddead11e3997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 29 Aug 2021 23:54:56 +0200 Subject: [PATCH] Already show password list in background before dismissing lock view (#497) Currently it's like: 1) Lock view is presented 2) Authenticate 3) Lock view disappears 4) Browser is shown briefly 5) Extension shows password list This change skips step 4. --- passKit/Controllers/PasscodeLockViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/passKit/Controllers/PasscodeLockViewController.swift b/passKit/Controllers/PasscodeLockViewController.swift index af114d1..c9c41d7 100644 --- a/passKit/Controllers/PasscodeLockViewController.swift +++ b/passKit/Controllers/PasscodeLockViewController.swift @@ -136,24 +136,24 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate { } } - internal func dismissPasscodeLock(completionHandler: (() -> Void)? = nil) { + private func dismissPasscodeLock(completionHandler: (() -> Void)? = nil) { // clean up the textfield DispatchQueue.main.async { self.passcodeTextField?.text = "" } + completionHandler?() + // pop if presentingViewController?.presentedViewController == self { // if presented as modal dismiss(animated: true) { [weak self] in self?.dismissCompletionCallback?() - completionHandler?() } } else { // if pushed in a navigation controller _ = navigationController?.popViewController(animated: true) dismissCompletionCallback?() - completionHandler?() } }