Explorar o código

new settings for : preferred provider

Marino Faggiana %!s(int64=6) %!d(string=hai) anos
pai
achega
fae80594c1
Modificáronse 2 ficheiros con 13 adicións e 10 borrados
  1. 2 3
      iOSClient/CCGlobal.h
  2. 11 7
      iOSClient/Main/CCSplit.m

+ 2 - 3
iOSClient/CCGlobal.h

@@ -79,9 +79,8 @@
 #define k_databaseDefault                               @"nextcloud.realm"
 
 // Intro selector
-#define k_intro_nothing                                 0
-#define k_intro_login                                   1
-#define k_intro_signup                                  2
+#define k_intro_login                                   0
+#define k_intro_signup                                  1
 
 // Login
 #define k_login_Add                                     0

+ 11 - 7
iOSClient/Main/CCSplit.m

@@ -132,9 +132,10 @@
     if ([NCBrandOptions sharedInstance].disable_intro) {
         
         [CCUtility setIntro:YES];
+        if (appDelegate.activeAccount.length == 0) {
+            [appDelegate openLoginView:self loginType:k_login_Add_Forced selector:k_intro_login];
+        }
     
-        [self introFinishSelector:0];
-
     } else {
     
         if ([CCUtility getIntro] == NO) {
@@ -143,8 +144,9 @@
             [_intro show];
         
         } else {
-    
-            [self introFinishSelector:0];
+            if (appDelegate.activeAccount.length == 0) {
+                [appDelegate openLoginView:self loginType:k_login_Add_Forced selector:k_intro_login];
+            }
         }
     }
 }
@@ -153,9 +155,11 @@
 {
     [CCUtility setIntro:YES];
     
-    // check account
-    
-    [self performSelector:@selector(newAccount) withObject:nil afterDelay:0.1];
+    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 loginType:k_login_Add_Forced selector:selector];
+        }
+    });
 }
 
 #pragma --------------------------------------------------------------------------------------------