瀏覽代碼

Improvements

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 年之前
父節點
當前提交
7282f914cf
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      iOSClient/AppDelegate.swift

+ 2 - 4
iOSClient/AppDelegate.swift

@@ -739,8 +739,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
         }
                 
                 
         if account == "" { return }
         if account == "" { return }
-        guard let passcode = CCUtility.getPasscode() else { return }
-        if passcode.count == 0 || CCUtility.getNotPasscodeAtStart() { return }
+        if CCUtility.getPasscode().count == 0 || CCUtility.getNotPasscodeAtStart() { return }
                 
                 
         // Dismiss present window?.rootViewController? [ONLY PASSCODE]
         // Dismiss present window?.rootViewController? [ONLY PASSCODE]
         let presentedViewController = window?.rootViewController?.presentedViewController
         let presentedViewController = window?.rootViewController?.presentedViewController
@@ -776,8 +775,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         
         
         if account == "" { return }
         if account == "" { return }
         if !CCUtility.getEnableTouchFaceID() { return }
         if !CCUtility.getEnableTouchFaceID() { return }
-        guard let passcode = CCUtility.getPasscode() else { return }
-        if passcode.count == 0 || CCUtility.getNotPasscodeAtStart() { return }
+        if CCUtility.getPasscode().count == 0 || CCUtility.getNotPasscodeAtStart() { return }
         guard let passcodeViewController = window?.rootViewController?.presentedViewController as? TOPasscodeViewController else { return }
         guard let passcodeViewController = window?.rootViewController?.presentedViewController as? TOPasscodeViewController else { return }
 
 
         LAContext().evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: NCBrandOptions.shared.brand) { (success, error) in
         LAContext().evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: NCBrandOptions.shared.brand) { (success, error) in