Browse Source

TOPasscodeViewController

marinofaggiana 3 years ago
parent
commit
71c5296d81

+ 1 - 1
Cartfile

@@ -6,6 +6,6 @@ github "xmartlabs/XLForm" ~> 4.1
 github "AssistoLab/DropDown" "v2.3.13"
 
 github "https://github.com/marinofaggiana/KTVHTTPCache" "2.0.2"
-github "https://github.com/marinofaggiana/TOPasscodeViewController" "0.0.8"
+github "https://github.com/marinofaggiana/TOPasscodeViewController" "0.0.9"
 github "https://github.com/marinofaggiana/OpenSSL" "master"
 github "https://github.com/marinofaggiana/ChromaColorPicker" "master"

+ 1 - 1
iOSClient/AppDelegate.swift

@@ -678,7 +678,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
         
         if passcodeViewController == nil {
-            passcodeViewController = TOPasscodeViewController.init(style: .translucentDark, passcodeType: .sixDigits)
+            passcodeViewController = TOPasscodeViewController.init(passcodeType: .sixDigits)
             passcodeViewController?.delegate = self
             passcodeViewController?.keypadButtonShowLettering = false
             if CCUtility.getEnableTouchFaceID() && laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {

+ 1 - 7
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -275,13 +275,7 @@
     
     if ([[CCUtility getPasscode] length] > 0) {
         
-        passcodeViewController = [[TOPasscodeViewController alloc] initWithStyle:TOPasscodeViewStyleTranslucentLight passcodeType:TOPasscodeTypeSixDigits];
-        if (@available(iOS 13.0, *)) {
-            if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
-                passcodeViewController.style = TOPasscodeViewStyleTranslucentDark;
-            }
-        }
-    
+        passcodeViewController = [[TOPasscodeViewController alloc] initPasscodeType:TOPasscodeTypeSixDigits];
         passcodeViewController.delegate = self;
         passcodeViewController.allowCancel = true;
         passcodeViewController.keypadButtonShowLettering = false;

+ 1 - 13
iOSClient/Settings/NCSettings.m

@@ -346,12 +346,6 @@
     if ([[CCUtility getPasscode] length] == 0) {
         
         passcodeSettingsViewController = [[TOPasscodeSettingsViewController alloc] init];
-        if (@available(iOS 13.0, *)) {
-            if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
-                passcodeSettingsViewController.style = TOPasscodeSettingsViewStyleDark;
-            }
-        }
-        
         passcodeSettingsViewController.hideOptionsButton = YES;
         passcodeSettingsViewController.requireCurrentPasscode = NO;
         passcodeSettingsViewController.passcodeType = TOPasscodeTypeSixDigits;
@@ -361,13 +355,7 @@
         
     } else {
      
-        passcodeViewController = [[TOPasscodeViewController alloc] initWithStyle:TOPasscodeViewStyleTranslucentLight passcodeType:TOPasscodeTypeSixDigits];
-        if (@available(iOS 13.0, *)) {
-            if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
-                passcodeViewController.style = TOPasscodeViewStyleTranslucentDark;
-            }
-        }
-        
+        passcodeViewController = [[TOPasscodeViewController alloc] initPasscodeType:TOPasscodeTypeSixDigits];
         passcodeViewController.allowCancel = true;
         passcodeViewController.delegate = self;
         passcodeViewController.keypadButtonShowLettering = false;