marinofaggiana 4 年之前
父节点
当前提交
d514b97872
共有 3 个文件被更改,包括 4 次插入5 次删除
  1. 3 1
      iOSClient/Brand/NCBrand.swift
  2. 0 3
      iOSClient/CCGlobal.h
  3. 1 1
      iOSClient/Networking/NCService.swift

+ 3 - 1
iOSClient/Brand/NCBrand.swift

@@ -219,7 +219,6 @@ class NCBrandColor: NSObject {
     // Directory on Group
     @objc public let appDatabaseNextcloud: String   = "Library/Application Support/Nextcloud"
 
-    
     // Database Realm
     public let databaseDefault: String              = "nextcloud.realm"
     public let databaseSchemaVersion: UInt64        = 153
@@ -228,4 +227,7 @@ class NCBrandColor: NSObject {
     public let indexPageActivity: Int               = 0
     public let indexPageComments: Int               = 1
     public let indexPageSharing: Int                = 2
+    
+    // Nextcloud unsupported
+    public let nextcloud_unsupported_version: Int   = 13
 }

+ 0 - 3
iOSClient/CCGlobal.h

@@ -286,9 +286,6 @@
 #define k_template_spreadsheet                          @"spreadsheet"
 #define k_template_presentation                         @"presentation"
 
-// Nextcloud unsupported
-#define k_nextcloud_unsupported                         13
-
 // Nextcloud version
 #define k_nextcloud_version_12_0                        12
 #define k_nextcloud_version_13_0                        13

+ 1 - 1
iOSClient/Networking/NCService.swift

@@ -137,7 +137,7 @@ class NCService: NSObject {
                     if extendedSupport == false {
                         if serverProductName == "owncloud" {
                             NCContentPresenter.shared.messageNotification("_warning_", description: "_warning_owncloud_", delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.info, errorCode: Int(k_dismissAfterSecondLong))
-                        } else if versionMajor <= k_nextcloud_unsupported {
+                        } else if versionMajor <=  NCBrandGlobal.shared.nextcloud_unsupported_version {
                             NCContentPresenter.shared.messageNotification("_warning_", description: "_warning_unsupported_", delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.info, errorCode: Int(k_dismissAfterSecondLong))
                         }
                     }