Browse Source

remove option getUploadAndRemovePhoto

Marino Faggiana 6 years ago
parent
commit
26d8f933b7

+ 3 - 3
iOSClient/Networking/CCNetworking.m

@@ -1135,7 +1135,7 @@
 #endif
         
         // Add Local
-        if (![CCUtility getUploadAndRemovePhoto]) {
+        if (![CCUtility getOptimizedPhoto]) {
             
             [[NCManageDatabase sharedInstance] addLocalFileWithMetadata:metadata];
         }
@@ -1146,11 +1146,11 @@
         if ([metadata.typeFile isEqualToString: k_metadataTypeFile_image])
             [[CCExifGeo sharedInstance] setExifLocalTableEtag:metadata];
         
-        // Remove icon
+        // Remove icon B/N
         [[NSFileManager defaultManager] removeItemAtPath:[CCUtility getDirectoryProviderStorageIconFileID:metadata.fileID fileNameView:metadata.fileNameView] error:nil];
         
         // Optimization
-        if (([CCUtility getUploadAndRemovePhoto] || [metadata.sessionSelector isEqualToString:selectorUploadAutoUploadAll]) && [metadata.typeFile isEqualToString:k_metadataTypeFile_document] == NO && isE2EEDirectory == NO) {
+        if (([CCUtility getOptimizedPhoto] || [metadata.sessionSelector isEqualToString:selectorUploadAutoUploadAll]) && ([metadata.typeFile isEqualToString:k_metadataTypeFile_image] || [metadata.typeFile isEqualToString:k_metadataTypeFile_video]) && isE2EEDirectory == NO) {
             
             [[NSFileManager defaultManager] removeItemAtPath:[CCUtility getDirectoryProviderStorageFileID:metadata.fileID fileNameView:metadata.fileNameView] error:nil];
         }

+ 0 - 15
iOSClient/Settings/CCAdvanced.m

@@ -87,16 +87,6 @@
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
     [section addFormRow:row];
     
-    section = [XLFormSectionDescriptor formSection];
-    [form addFormSection:section];
-    section.footerTitle = NSLocalizedString(@"_upload_del_photos_how_", nil);
-    
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"uploadremovephoto" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_upload_del_photos_", nil)];
-    if ([CCUtility getUploadAndRemovePhoto]) row.value = @"1";
-    else row.value = @"0";
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [section addFormRow:row];
-
     // Section HIDDEN FILES -------------------------------------------------
 
     section = [XLFormSectionDescriptor formSection];
@@ -209,11 +199,6 @@
         [CCUtility setOptimizedPhoto:[[rowDescriptor.value valueData] boolValue]];
     }
     
-    if ([rowDescriptor.tag isEqualToString:@"uploadremovephoto"]) {
-        
-        [CCUtility setUploadAndRemovePhoto:[[rowDescriptor.value valueData] boolValue]];
-    }
-    
     if ([rowDescriptor.tag isEqualToString:@"showHiddenFiles"]) {
         
         [CCUtility setShowHiddenFiles:[[rowDescriptor.value valueData] boolValue]];

+ 1 - 1
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -218,7 +218,7 @@
 
 "_optimized_photos_"            = "Optimized photo resolution";
 "_upload_del_photos_"           = "Remove files after upload";
-"_optimized_photos_how_"        = "Download for view, if possible, only a low-resolution photos.";
+"_optimized_photos_how_"        = "View, if possible, only a low-resolution photos.";
 "_upload_del_photos_how_"       = "Files will be removed from device memory after they’ve been uploaded to your cloud. They will remain in the camera roll. Just download the files to see them.";
 "_show_hidden_files_"           = "Show hidden files";
 "_format_compatibility_"        = "Most Compatible";

+ 0 - 3
iOSClient/Utility/CCUtility.h

@@ -73,9 +73,6 @@
 + (BOOL)getOptimizedPhoto;
 + (void)setOptimizedPhoto:(BOOL)resize;
 
-+ (BOOL)getUploadAndRemovePhoto;
-+ (void)setUploadAndRemovePhoto:(BOOL)remove;
-
 + (NSString *)getOrderSettings;
 + (void)setOrderSettings:(NSString *)order;
 

+ 0 - 11
iOSClient/Utility/CCUtility.m

@@ -191,17 +191,6 @@
     [UICKeyChainStore setString:sOptimizedPhoto forKey:@"optimizedphoto" service:k_serviceShareKeyChain];
 }
 
-+ (BOOL)getUploadAndRemovePhoto
-{
-    return [[UICKeyChainStore stringForKey:@"uploadremovephoto" service:k_serviceShareKeyChain] boolValue];
-}
-
-+ (void)setUploadAndRemovePhoto:(BOOL)remove
-{
-    NSString *sRemovePhoto = (remove) ? @"true" : @"false";
-    [UICKeyChainStore setString:sRemovePhoto forKey:@"uploadremovephoto" service:k_serviceShareKeyChain];
-}
-
 + (NSString *)getOrderSettings
 {
     NSString *order = [UICKeyChainStore stringForKey:@"order" service:k_serviceShareKeyChain];