Marino Faggiana 8 gadi atpakaļ
vecāks
revīzija
62a670355d

+ 5 - 6
iOSClient/Main/CCMain.m

@@ -164,7 +164,7 @@
     _reMenuBackgroundView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
     
     // if this is not Main (the Main uses inizializeMain)
-    if (_isRoot == NO && app.activeAccount) {
+    if (_isRoot == NO && app.activeAccount.length > 0) {
         
         // Settings this folder & delegate & Loading datasource
         app.directoryUser = [CCUtility getDirectoryActiveUser:app.activeUser activeUrl:app.activeUrl];
@@ -183,7 +183,6 @@
     app.controlCenter = (CCControlCenter *)self.navigationController;
     
     // Search
-    
     self.definesPresentationContext = YES;
     self.searchController.searchResultsUpdater = self;
     self.searchController.dimsBackgroundDuringPresentation = NO;
@@ -304,7 +303,7 @@
     _dateReadDataSource = nil;
     
     // test
-    if (app.activeAccount.length == 0 || app.activeUrl.length == 0)
+    if (app.activeAccount.length == 0)
         return;
     
     if ([app.listMainVC count] == 0 || _isRoot) {
@@ -1141,7 +1140,7 @@
 - (void)requestServerInformation
 {
     // test
-    if (app.activeAccount.length == 0 || app.activeUrl.length == 0)
+    if (app.activeAccount.length == 0)
         return;
     
     CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
@@ -4260,7 +4259,7 @@
                                         
                                         [CCCoreData clearDateReadDirectory:oldPath activeAccount:app.activeAccount];
                                         
-                                        if (app.activeAccount.length > 0 && app.activeUrl.length > 0 && app.activePhotosCameraUpload)
+                                        if (app.activeAccount.length > 0 && app.activePhotosCameraUpload)
                                             [app.activePhotosCameraUpload reloadDatasourceForced];
                                         
                                         [self readFolderWithForced:YES];
@@ -4612,7 +4611,7 @@
 - (void)reloadDatasource:(NSString *)serverUrl fileID:(NSString *)fileID selector:(NSString *)selector
 {
     // test
-    if (app.activeAccount.length == 0 || app.activeUrl.length == 0 || serverUrl.length == 0)
+    if (app.activeAccount.length == 0 || serverUrl.length == 0)
         return;
     
     // Search Mode

+ 4 - 2
iOSClient/Main/CCSplit.m

@@ -117,7 +117,8 @@
 {
     BOOL isIntro = [CCUtility getIntro:self.version];
     
-    if ([app.activeAccount length] > 0  && isIntro == NO) {
+    // test
+    if (app.activeAccount.length > 0  && isIntro == NO) {
         
         //[self bannerHide];
         
@@ -143,7 +144,8 @@
 
 - (void)newAccount
 {
-    if ([app.activeAccount length] == 0) {
+    // test
+    if (app.activeAccount.length == 0) {
     
         CCLogin *loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
         loginVC.delegate = self;

+ 3 - 2
iOSClient/Offline/CCOfflineFileFolder.m

@@ -54,7 +54,8 @@
 // MULTI THREAD
 - (void)readFolderOffline
 {
-    if ([app.activeAccount length] == 0)
+    // test
+    if (app.activeAccount.length == 0)
         return;
 
     // verify is offline procedure is in progress selectorDownloadOffline
@@ -279,7 +280,7 @@
 - (void)readFileOffline
 {
     // test
-    if (app.activeAccount.length == 0 || [CCUtility getHomeServerUrlActiveUrl:app.activeUrl] == nil)
+    if (app.activeAccount.length == 0)
         return;
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{

+ 1 - 1
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -516,7 +516,7 @@
 - (void)reloadDatasource
 {
     // test
-    if (app.activeAccount.length == 0 || app.activeUrl.length == 0)
+    if (app.activeAccount.length == 0)
         return;
     
     NSString *serverUrl = [CCCoreData getCameraUploadFolderNamePathActiveAccount:app.activeAccount activeUrl:app.activeUrl];