Browse Source

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
e49dc18f43

+ 3 - 5
iOSClient/Networking/NCNetworking.swift

@@ -625,11 +625,9 @@ import Queuer
                 metadata.deleteAssetLocalIdentifier = true
             }
 
-            if CCUtility.getDisableLocalCacheAfterUpload() {
-                CCUtility.removeFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId))
-            } else {
-                NCManageDatabase.shared.addLocalFile(metadata: metadata)
-            }
+            // Remove file
+            CCUtility.removeFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId))
+
             NCManageDatabase.shared.addMetadata(metadata)
             NCManageDatabase.shared.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", ocIdTemp))
 

+ 0 - 19
iOSClient/Settings/CCAdvanced.m

@@ -84,20 +84,6 @@
     [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
     [section addFormRow:row];
     
-    // Disable Local Cache After Upload
-    
-    section = [XLFormSectionDescriptor formSection];
-    [form addFormSection:section];
-    section.footerTitle = NSLocalizedString(@"_disableLocalCacheAfterUpload_footer_", nil);
-    
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"disableLocalCacheAfterUpload" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_disableLocalCacheAfterUpload_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.secondarySystemGroupedBackground;
-    if ([CCUtility getDisableLocalCacheAfterUpload]) row.value = @"1";
-    else row.value = @"0";
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.label forKey:@"textLabel.textColor"];
-    [section addFormRow:row];
-
     // Section : Files App --------------------------------------------------------------
     
     if (![NCBrandOptions shared].disable_openin_file) {
@@ -351,11 +337,6 @@
         [CCUtility setRemovePhotoCameraRoll:[[rowDescriptor.value valueData] boolValue]];
     }
     
-    if ([rowDescriptor.tag isEqualToString:@"disableLocalCacheAfterUpload"]) {
-        
-        [CCUtility setDisableLocalCacheAfterUpload:[[rowDescriptor.value valueData] boolValue]];
-    }
-    
     if ([rowDescriptor.tag isEqualToString:@"disablefilesapp"]) {
         
         [CCUtility setDisableFilesApp:[[rowDescriptor.value valueData] boolValue]];

+ 0 - 3
iOSClient/Utility/CCUtility.h

@@ -148,9 +148,6 @@
 
 + (NSData *)getDatabaseEncryptionKey;
 
-+ (BOOL)getDisableLocalCacheAfterUpload;
-+ (void)setDisableLocalCacheAfterUpload:(BOOL)disable;
-
 + (BOOL)getLivePhoto;
 + (void)setLivePhoto:(BOOL)set;
 

+ 0 - 11
iOSClient/Utility/CCUtility.m

@@ -556,17 +556,6 @@
     [UICKeyChainStore setData:data forKey:@"databaseEncryptionKey" service:NCGlobal.shared.serviceShareKeyChain];
 }
 
-+ (BOOL)getDisableLocalCacheAfterUpload
-{
-    return [[UICKeyChainStore stringForKey:@"disableLocalCacheAfterUpload" service:NCGlobal.shared.serviceShareKeyChain] boolValue];
-}
-
-+ (void)setDisableLocalCacheAfterUpload:(BOOL)disable
-{
-    NSString *sDisable = (disable) ? @"true" : @"false";
-    [UICKeyChainStore setString:sDisable forKey:@"disableLocalCacheAfterUpload" service:NCGlobal.shared.serviceShareKeyChain];
-}
-
 + (BOOL)getLivePhoto
 {
     NSString *valueString = [UICKeyChainStore stringForKey:@"livePhoto" service:NCGlobal.shared.serviceShareKeyChain];