marinofaggiana 4 роки тому
батько
коміт
5fb8c45eed

+ 7 - 2
iOSClient/AppDelegate.m

@@ -245,7 +245,12 @@
         vc.account = account;
         
         [self.window.rootViewController presentViewController:vc animated:YES completion:nil];
+        
+    } else {
+        [self passcode];
     }
+#else
+    [self passcode];
 #endif
 }
 
@@ -1718,9 +1723,9 @@
 
 - (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
 {
-    [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:@"Nextcloud" reply:^(BOOL success, NSError * _Nullable error) {
+    [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions sharedInstance] brand] reply:^(BOOL success, NSError * _Nullable error) {
         if (success) {
-            dispatch_async(dispatch_get_main_queue(), ^{
+            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
                 [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
             });
         }

+ 1 - 1
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -295,7 +295,7 @@
 
 - (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
 {
-    [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:@"Nextcloud" reply:^(BOOL success, NSError * _Nullable error) {
+    [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions sharedInstance] brand] reply:^(BOOL success, NSError * _Nullable error) {
         if (success) {
             dispatch_async(dispatch_get_main_queue(), ^{
                 [self passcodeCorrectCode];