marinofaggiana 5 жил өмнө
parent
commit
a92f9add7d

+ 0 - 1
iOSClient/AppDelegate.h

@@ -37,7 +37,6 @@
 #import "CCFavorites.h"
 #import "CCTransfers.h"
 
-@class CCLoginWeb;
 @class CCMore;
 @class NCMedia;
 @class NCOffline;

+ 25 - 29
iOSClient/AppDelegate.m

@@ -288,14 +288,13 @@ PKPushRegistry *pushRegistry;
             
             if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
                 
-//                _activeLoginWeb = [CCLoginWeb new];
-//                _activeLoginWeb.delegate = delegate;
-//                _activeLoginWeb.loginType = loginType;
-//                _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
-//
-//                dispatch_async(dispatch_get_main_queue(), ^ {
-//                    [_activeLoginWeb open:viewController];
-//                });
+                self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
+                
+                self.activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
+                self.activeLoginWeb.loginType = loginType;
+                self.activeLoginWeb.delegate = delegate;
+
+                [viewController presentViewController:self.activeLoginWeb animated:YES completion:nil];
             }
             return;
         }
@@ -314,31 +313,28 @@ PKPushRegistry *pushRegistry;
             
             if (!(_activeLoginWeb.isViewLoaded && _activeLoginWeb.view.window)) {
                 
-//                _activeLoginWeb = [CCLoginWeb new];
-//                _activeLoginWeb.delegate = delegate;
-//                _activeLoginWeb.loginType = loginType;
-//
-//                if (selector == k_intro_signup) {
-//                    _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] linkloginPreferredProviders];
-//                } else {
-//                    _activeLoginWeb.urlBase = self.activeUrl;
-//                }
-//
-//                dispatch_async(dispatch_get_main_queue(), ^ {
-//                    [_activeLoginWeb open:viewController];
-//                });
+                self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
+                
+                if (selector == k_intro_signup) {
+                    self.activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] linkloginPreferredProviders];
+                } else {
+                    self.activeLoginWeb.urlBase = self.activeUrl;
+                }
+                self.activeLoginWeb.loginType = loginType;
+                self.activeLoginWeb.delegate = delegate;
+                
+                [viewController presentViewController:self.activeLoginWeb animated:YES completion:nil];
             }
             
         } else if ([NCBrandOptions sharedInstance].disable_intro && [NCBrandOptions sharedInstance].disable_request_login_url) {
             
-//            _activeLoginWeb = [CCLoginWeb new];
-//            _activeLoginWeb.delegate = delegate;
-//            _activeLoginWeb.loginType = loginType;
-//            _activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
-//            
-//            dispatch_async(dispatch_get_main_queue(), ^ {
-//                [_activeLoginWeb open:viewController];
-//            });
+            self.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
+            
+            self.activeLoginWeb.urlBase = [[NCBrandOptions sharedInstance] loginBaseUrl];
+            self.activeLoginWeb.loginType = loginType;
+            self.activeLoginWeb.delegate = delegate;
+            
+            [viewController presentViewController:self.activeLoginWeb animated:YES completion:nil];
             
         } else {
             

+ 0 - 1
iOSClient/Login/CCLogin.h

@@ -27,7 +27,6 @@
 #import "CCCertificate.h"
 #import "OCNetworking.h"
 
-@class CCLoginWeb;
 @class NCLoginWeb;
 @class NCLoginQRCode;
 

+ 0 - 9
iOSClient/Login/CCLogin.m

@@ -190,21 +190,12 @@
             // Login Flow
             if (_user.hidden && _password.hidden && versionMajor >= k_flow_version_available) {
                 
-#ifdef DEBUG
                 appDelegate.activeLoginWeb = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCLoginWeb"];
                 appDelegate.activeLoginWeb.urlBase = self.baseUrl.text;
                 appDelegate.activeLoginWeb.loginType = _loginType;
                 appDelegate.activeLoginWeb.delegate = self;
                 
                 [self presentViewController:appDelegate.activeLoginWeb animated:YES completion:nil];
-#else
-                appDelegate.activeLoginWeb = [CCLoginWeb new];
-                appDelegate.activeLoginWeb.loginType = _loginType;
-                appDelegate.activeLoginWeb.delegate = self;
-                appDelegate.activeLoginWeb.urlBase = self.baseUrl.text;
-                
-                [appDelegate.activeLoginWeb open:self];
-#endif
             }
             
             // NO Login Flow available