From 813f59a95a1274bdb2170dced0b26c38b98f3672 Mon Sep 17 00:00:00 2001 From: Brett Doffing Date: Wed, 6 Mar 2019 12:04:14 -0600 Subject: [PATCH] Pin code view update. Changed the timing for when to show the pin code view controller. --- .../Flow/RootNavigation/RootNavigationViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sentinel/UI/Flow/RootNavigation/RootNavigationViewController.swift b/Sentinel/UI/Flow/RootNavigation/RootNavigationViewController.swift index c873790..a50069e 100644 --- a/Sentinel/UI/Flow/RootNavigation/RootNavigationViewController.swift +++ b/Sentinel/UI/Flow/RootNavigation/RootNavigationViewController.swift @@ -35,12 +35,12 @@ class RootNavigationViewController: UINavigationController { } @objc func checkForPin() { - guard (Locksmith.loadDataForUserAccount(userAccount: "account") != nil), let lastPin = UserDefaults.standard.value(forKey: "lastPin") as? Date, Int(Date().timeIntervalSince(lastPin)) < 900, loaded else { - showPIN() + guard (Locksmith.loadDataForUserAccount(userAccount: "account") != nil), let lastPin = UserDefaults.standard.value(forKey: "lastPin") as? Date, Int(Date().timeIntervalSince(lastPin)) > 900, loaded else { + showHome() return } + showPIN() - showHome() } lazy var homeVC: HomeFlowViewController = {