فهرست منبع

new format option

Marino Faggiana 8 سال پیش
والد
کامیت
e9ef605dc1

+ 7 - 1
iOSClient/AppDelegate.m

@@ -366,7 +366,7 @@
         NSLog(@"[LOG] Initialize Camera Upload");
         [[NSNotificationCenter defaultCenter] postNotificationName:@"initStateCameraUpload" object:nil];
         
-#ifndef NO_OFFLINE
+#ifndef OPTION_OFFLINE_DISABLE
         NSLog(@"[LOG] files Offline");
         [[CCSynchronize sharedSynchronize] readOffline];
 #endif
@@ -426,6 +426,9 @@
 
 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
 {
+    
+#ifdef OPTION_NOTIFICATION_PUSH_ENABLE
+    
     NSDictionary *keys = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:k_nextcloudDevicePushKey ofType:@"plist"]];
     
     NSString *devicePublicKey = [keys objectForKey:@"devicePublicKey"];
@@ -444,6 +447,9 @@
         metadataNet.options = options;
         [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
     }
+    
+#endif
+    
 }
 
 - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error

+ 7 - 5
iOSClient/Brand/CCNextcloudConstant.h

@@ -29,14 +29,16 @@
 /* Define option compiler */
 
 /*
- #define NO_MULTIUSER
+ #define OPTION_MULTIUSER_DISABLE
+ #define OPTION_CRYPTO_CLOUD_SYSTEM_DISABLE
+ #define OPTION_OFFLINE_DISABLE
+ #define OPTION_NOTIFICATION_PUSH_ENABLE
+
+ #define MENU_BRAND_ENABLE
  #define NO_REQUEST_LOGIN_URL
- #define NO_CRYPTO_CLOUD_SYSTEM
- #define NO_OFFLINE
- #define MENU_BRAND
  */
 
-#define NO_OFFLINE
+#define OPTION_OFFLINE_DISABLE
 
 // -----------------------------------------------------------------------------------------------------------
 // COLOR

+ 4 - 4
iOSClient/Main/CCMain.m

@@ -3154,7 +3154,7 @@
     if (app.reSelectMenu.isOpen || app.reMainMenu.isOpen)
         return;
     
-#ifndef NO_MULTIUSER
+#ifndef OPTION_MULTIUSER_DISABLE
     
     if ([app.netQueue operationCount] > 0 || [app.netQueueDownload operationCount] > 0 || [app.netQueueDownloadWWan operationCount] > 0 || [app.netQueueUpload operationCount] > 0 || [app.netQueueUploadWWan operationCount] > 0 || [CCCoreData countTableAutomaticUploadForAccount:app.activeAccount selector:nil] > 0) {
         
@@ -3216,7 +3216,7 @@
     [CCMenu showMenuInView:self.navigationController.view fromRect:rect menuItems:menuArray withOptions:options];
 #endif
     
-#if defined(MENU_BRAND) && defined(NO_MULTIUSER)
+#if defined(MENU_BRAND_ENABLE) && defined(OPTION_MULTIUSER_DISABLE)
     
     
 #endif
@@ -4341,7 +4341,7 @@
                                     }];
         }
         
-#ifndef NO_OFFLINE
+#ifndef OPTION_OFFLINE_DISABLE
         
         NSString *upDir = [CCUtility deletingLastPathComponentFromServerUrl:dirServerUrl];
         NSString *homeDir = [CCUtility getHomeServerUrlActiveUrl:app.activeUrl];
@@ -4511,7 +4511,7 @@
                                     }];
         }
         
-#ifndef NO_OFFLINE
+#ifndef OPTION_OFFLINE_DISABLE
         
         if (!_metadata.cryptated) {
         

+ 1 - 1
iOSClient/Offline/CCOfflineContainer.m

@@ -68,7 +68,7 @@
     
     // Create data model
 
-#ifdef NO_OFFLINE
+#ifdef OPTION_OFFLINE_DISABLE
     _pageType = @[k_pageOfflineFavorites, k_pageOfflineLocal];
 #else
     _pageType = @[k_pageOfflineFavorites, k_pageOfflineOffline, k_pageOfflineLocal];

+ 2 - 2
iOSClient/Settings/CCSettings.m

@@ -102,7 +102,7 @@
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
     [section addFormRow:row];
     
-#ifndef NO_MULTIUSER
+#ifndef OPTION_MULTIUSER_DISABLE
     // Change Account
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"changecredentials" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_change_credentials_", nil)];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
@@ -184,7 +184,7 @@
     row.action.formSegueIdentifier = @"CCManageOptimizationsSegue";
     [section addFormRow:row];
 
-#ifndef NO_CRYPTO_CLOUD_SYSTEM
+#ifndef OPTION_CRYPTO_CLOUD_SYSTEM_DISABLE
     // Section CRYPTO CLOUD SYSTEM ------------------------------------------
     
     section = [XLFormSectionDescriptor formSection];