marinofaggiana il y a 5 ans
Parent
commit
4a1c3629d1

+ 1 - 1
iOSClient/AppDelegate.h

@@ -141,7 +141,7 @@
 
 // Login
 - (void)startTimerErrorNetworking;
-- (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector unauthorized:(BOOL)unauthorized;
+- (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
 
 // Setting Account
 - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;

+ 4 - 4
iOSClient/AppDelegate.m

@@ -269,7 +269,7 @@ PKPushRegistry *pushRegistry;
     
     // check unauthorized server (401)
     if ([CCUtility getPassword:self.activeAccount].length == 0) {
-        [self openLoginView:self.window.rootViewController selector:k_intro_login unauthorized:true];
+        [self openLoginView:self.window.rootViewController selector:k_intro_login openLoginWeb:true];
     }
     
     // check certificate untrusted (-1202)
@@ -278,7 +278,7 @@ PKPushRegistry *pushRegistry;
     }
 }
 
-- (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector unauthorized:(BOOL)unauthorized
+- (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb
 {
     @synchronized (self) {
 
@@ -340,7 +340,7 @@ PKPushRegistry *pushRegistry;
                 [viewController presentViewController:self.activeLoginWeb animated:YES completion:nil];
             });
             
-        } else if (unauthorized) {
+        } else if (openLoginWeb) {
             
             if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
                 self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
@@ -412,7 +412,7 @@ PKPushRegistry *pushRegistry;
             [self settingActiveAccount:newAccount activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:[CCUtility getPassword:tableAccount.account]];
             [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
         } else {
-            [self openLoginView:self.window.rootViewController selector:k_intro_login unauthorized:false];
+            [self openLoginView:self.window.rootViewController selector:k_intro_login openLoginWeb:false];
         }
     }
 }

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -2075,7 +2075,7 @@
 
 - (void)addNewAccount:(CCMenuItem *)sender
 {
-    [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+    [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:false];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -436,7 +436,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
                 let manageAccount = CCManageAccount()
                 manageAccount.delete(self.appDelegate.activeAccount)
                 
-                self.appDelegate.openLoginView(self, selector: Int(k_intro_login), unauthorized:false)
+                self.appDelegate.openLoginView(self, selector: Int(k_intro_login), openLoginWeb:false)
             }
             
             let actionNo = UIAlertAction(title: NSLocalizedString("_no_delete_", comment: ""), style: .default) { (action:UIAlertAction) in

+ 4 - 4
iOSClient/Main/CCSplit.m

@@ -134,7 +134,7 @@
     if ([NCBrandOptions sharedInstance].disable_intro) {
         
         [CCUtility setIntro:YES];
-        [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+        [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:false];
         
     
     } else {
@@ -146,7 +146,7 @@
         
         } else {
             if (appDelegate.activeAccount.length == 0) {
-                [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+                [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:false];
             }
         }
     }
@@ -160,7 +160,7 @@
             {
                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
                     if (appDelegate.activeAccount.length == 0) {
-                        [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+                        [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:false];
                     }
                 });
             }
@@ -168,7 +168,7 @@
             
         case k_intro_signup:
             {
-                [appDelegate openLoginView:self selector:k_intro_signup unauthorized:false];
+                [appDelegate openLoginView:self selector:k_intro_signup openLoginWeb:false];
             }
             break;
     }

+ 3 - 3
iOSClient/Settings/CCManageAccount.m

@@ -338,7 +338,7 @@
     
     // Open Login
     if (listAccount.count == 0) {
-        [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+        [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:false];
     }
 }
 
@@ -396,7 +396,7 @@
 {
     [self deselectFormRow:sender];
     
-    [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+    [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:false];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -407,7 +407,7 @@
 {    
     [self deselectFormRow:sender];
     
-    [appDelegate openLoginView:self selector:k_intro_login unauthorized:false];
+    [appDelegate openLoginView:self selector:k_intro_login openLoginWeb:true];
 }
 
 #pragma --------------------------------------------------------------------------------------------