浏览代码

Brand added: cleanUpDay

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父节点
当前提交
90e02211ee
共有 2 个文件被更改,包括 4 次插入1 次删除
  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];
     }