Browse Source

Brand added: cleanUpDay

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
90e02211ee
2 changed files with 4 additions and 1 deletions
  1. 2 0
      Brand/NCBrand.swift
  2. 2 1
      iOSClient/Utility/CCUtility.m

+ 2 - 0
Brand/NCBrand.swift

@@ -79,6 +79,8 @@ import UIKit
     @objc public var disable_log:                       Bool = false
     @objc public var disable_mobileconfig:              Bool = false
 
+    @objc public var cleanUpDay:                        Int = 0                                                     // Set default "Delete all file older than " possible value are: 0, 1, 7, 30, 90, 180, 365
+
     override init() {
 
         if folderBrandAutoUpload != "" {

+ 2 - 1
iOSClient/Utility/CCUtility.m

@@ -700,7 +700,8 @@
     NSString *size = [UICKeyChainStore stringForKey:@"cleanUpDay" service:NCGlobal.shared.serviceShareKeyChain];
     
     if (size == nil) {
-        return 0;
+        NSInteger days = [[NCBrandOptions shared] cleanUpDay];
+        return days;
     } else {
         return [size integerValue];
     }