Browse Source

Clear code

Marino Faggiana 8 years ago
parent
commit
fa1e189d83

+ 0 - 17
iOSClient/Brand/CCNextcloudConstant.h

@@ -31,23 +31,6 @@
 
 // Capabilities Group & Service Key Share
 #define k_capabilitiesGroups            @"group.it.twsweb.Crypto-Cloud"
-#define k_serviceShareKeyChain          @"Crypto Cloud"
-#define k_metadataKeyedUnarchiver       @"it.twsweb.Crypto-Cloud.metadata"
-
-// Session
-#define k_download_session              @"it.twsweb.Crypto-Cloud.download.session"
-#define k_download_session_foreground   @"it.twsweb.Crypto-Cloud.download.sessionforeground"
-#define k_download_session_wwan         @"it.twsweb.Crypto-Cloud.download.sessionwwan"
-#define k_upload_session                @"it.twsweb.Crypto-Cloud.upload.session"
-#define k_upload_session_foreground     @"it.twsweb.Crypto-Cloud.upload.sessionforeground"
-#define k_upload_session_wwan           @"it.twsweb.Crypto-Cloud.upload.sessionwwan"
-
-// OperationQueue
-#define k_queue                         @"it.twsweb.Crypto-Cloud.queue"
-#define k_download_queue                @"it.twsweb.Crypto-Cloud.download.queue"
-#define k_download_queuewwan            @"it.twsweb.Crypto-Cloud.download.queuewwan"
-#define k_upload_queue                  @"it.twsweb.Crypto-Cloud.upload.queue"
-#define k_upload_queuewwan              @"it.twsweb.Crypto-Cloud.upload.queuewwan"
 
 /* Define option compiler */
 

+ 21 - 0
iOSClient/CCGlobal.h

@@ -104,6 +104,27 @@ extern NSString *const urlBaseUploadDB;
 
 #define k_networkingSessionNotification                 @"networkingSessionNotification"
 
+// Session
+#define k_domain_session_queue                          @"it.twsweb.Crypto-Cloud"
+
+#define k_download_session                              @"it.twsweb.Crypto-Cloud.download.session"
+#define k_download_session_foreground                   @"it.twsweb.Crypto-Cloud.download.sessionforeground"
+#define k_download_session_wwan                         @"it.twsweb.Crypto-Cloud.download.sessionwwan"
+#define k_upload_session                                @"it.twsweb.Crypto-Cloud.upload.session"
+#define k_upload_session_foreground                     @"it.twsweb.Crypto-Cloud.upload.sessionforeground"
+#define k_upload_session_wwan                           @"it.twsweb.Crypto-Cloud.upload.sessionwwan"
+
+// OperationQueue
+#define k_queue                                         @"it.twsweb.Crypto-Cloud.queue"
+#define k_download_queue                                @"it.twsweb.Crypto-Cloud.download.queue"
+#define k_download_queuewwan                            @"it.twsweb.Crypto-Cloud.download.queuewwan"
+#define k_upload_queue                                  @"it.twsweb.Crypto-Cloud.upload.queue"
+#define k_upload_queuewwan                              @"it.twsweb.Crypto-Cloud.upload.queuewwan"
+
+// Service Key Share
+#define k_serviceShareKeyChain                          @"Crypto Cloud"
+#define k_metadataKeyedUnarchiver                       @"it.twsweb.Crypto-Cloud.metadata"
+
 // TaskIdentifier
 #define k_taskIdentifierDone                            -1
 #define k_taskIdentifierStop                            -2

+ 1 - 0
iOSClient/FileSystem/CCCoreData.m

@@ -1906,6 +1906,7 @@
 + (void)addActivityClient:(NSString *)file fileID:(NSString *)fileID action:(NSString *)action selector:(NSString *)selector note:(NSString *)note type:(NSString *)type verbose:(NSInteger)verbose account:(NSString *)account activeUrl:(NSString *)activeUrl
 {
     note = [note stringByReplacingOccurrencesOfString:[activeUrl stringByAppendingString:webDAV] withString:@""];
+    note = [note stringByReplacingOccurrencesOfString:[k_domain_session_queue stringByAppendingString:@"."] withString:@""];
 
     [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext *localContext) {
         

+ 1 - 1
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -1221,7 +1221,7 @@
         NSString *media = @"";
         if (assetMediaType == PHAssetMediaTypeImage) media = @"Image";
         if (assetMediaType == PHAssetMediaTypeVideo) media = @"Video";
-        [CCCoreData addActivityClient:fileName fileID:metadataNet.identifier action:k_activityDebugActionAutomaticUpload selector:metadataNet.selector note:[NSString stringWithFormat:@"Add Automatic Upload on Session: %@, Media Type: %@, Data: %@", session, media, assetDate] type:k_activityTypeInfo verbose:k_activityVerboseHigh account:app.activeAccount activeUrl:app.activeUrl];
+        [CCCoreData addActivityClient:fileName fileID:metadataNet.identifier action:k_activityDebugActionAutomaticUpload selector:metadataNet.selector note:[NSString stringWithFormat:@"Add Automatic Upload on Session: %@, Media Type: %@, Asset Data: %@", session, media, [NSDateFormatter localizedStringFromDate:assetDate dateStyle:NSDateFormatterMediumStyle timeStyle:NSDateFormatterMediumStyle]] type:k_activityTypeInfo verbose:k_activityVerboseHigh account:app.activeAccount activeUrl:app.activeUrl];
         
         // Upldate Camera Upload data  
         if ([metadataNet.selector isEqualToString:selectorUploadAutomatic])