marinofaggiana 4 tahun lalu
induk
melakukan
af044c96a2

+ 15 - 9
iOSClient/Brand/NCBrand.swift

@@ -217,21 +217,27 @@ class NCBrandColor: NSObject {
     }()
 
     // Directory on Group
-    @objc public let appDatabaseNextcloud: String   = "Library/Application Support/Nextcloud"
+    @objc let appDatabaseNextcloud: String          = "Library/Application Support/Nextcloud"
 
     // Database Realm
-    public let databaseDefault: String              = "nextcloud.realm"
-    public let databaseSchemaVersion: UInt64        = 160
+    let databaseDefault: String                     = "nextcloud.realm"
+    let databaseSchemaVersion: UInt64               = 160
     
     // E2EE
-    public let e2eeMaxFileSize: UInt64              = 524288000   // 500 MB
-    @objc public let e2eeVersion: String            = "1.1"
+    let e2eeMaxFileSize: UInt64                     = 524288000   // 500 MB
+    @objc let e2eeVersion: String                   = "1.1"
+    
+    // Max Size Upload
+    let uploadMaxFileSize: UInt64                   = 524288000   // 500 MB
+    
+    // Max Cache Proxy Video
+    let maxHTTPCache: Int64                         = 10737418240 // 10 GB
     
     // NCSharePaging
-    public let indexPageActivity: Int               = 0
-    public let indexPageComments: Int               = 1
-    public let indexPageSharing: Int                = 2
+    let indexPageActivity: Int                      = 0
+    let indexPageComments: Int                      = 1
+    let indexPageSharing: Int                       = 2
     
     // Nextcloud unsupported
-    public let nextcloud_unsupported_version: Int   = 13
+    let nextcloud_unsupported_version: Int          = 13
 }

+ 0 - 9
iOSClient/CCGlobal.h

@@ -75,9 +75,6 @@
 #define k_sizePreview                                   1024
 #define k_sizeIcon                                      512
 
-// Database JSON
-#define k_databaseDefaultJSON                           @"nextcloud.json"
-
 // Intro selector
 #define k_intro_login                                   0
 #define k_intro_signup                                  1
@@ -131,12 +128,6 @@
 #define k_timerUpdateApplicationIconBadgeNumber         5
 #define k_timerErrorNetworking                          3
 
-// Max Size Operation
-#define k_maxSizeOperationUpload                        524288000   // 500 MB
-
-// Max Cache Proxy Video
-#define k_maxHTTPCache                                  10737418240 // 10GB
-
 // Error
 #define k_CCErrorBadRequest                             400
 #define k_CCErrorResourceNotFound                       404

+ 2 - 2
iOSClient/Networking/NCNetworkingAutoUpload.swift

@@ -58,7 +58,7 @@ class NCNetworkingAutoUpload: NSObject {
         for metadata in metadatasUpload {
             sizeUpload = sizeUpload + Int(metadata.size)
         }
-        if sizeUpload > k_maxSizeOperationUpload { return }
+        if sizeUpload > NCBrandGlobal.shared.uploadMaxFileSize { return }
         
         timerProcess?.invalidate()
         
@@ -108,7 +108,7 @@ class NCNetworkingAutoUpload: NSObject {
                                 NCNetworking.shared.upload(metadata: metadata) { (_, _) in }
                             }
                             sizeUpload = sizeUpload + Int(metadata.size)
-                            if sizeUpload > k_maxSizeOperationUpload {
+                            if sizeUpload > NCBrandGlobal.shared.uploadMaxFileSize {
                                 self.startTimer()
                                 return
                             }

+ 1 - 1
iOSClient/Viewer/NCViewerVideo/NCKTVHTTPCache.swift

@@ -104,7 +104,7 @@ class NCKTVHTTPCache: NSObject {
     
     private func setupHTTPCache() {
         
-        KTVHTTPCache.cacheSetMaxCacheLength(Int64(k_maxHTTPCache))
+        KTVHTTPCache.cacheSetMaxCacheLength(NCBrandGlobal.shared.maxHTTPCache)
         
         if ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] != nil {
             KTVHTTPCache.logSetConsoleLogEnable(true)