marinofaggiana 4 lat temu
rodzic
commit
14acb8cf32

+ 1 - 1
iOSClient/Database/NCManageDatabase.swift

@@ -1393,7 +1393,7 @@ class NCManageDatabase: NSObject {
                 addObject.url = externalSite.url
                 addObject.type = externalSite.type
            
-                realm.add(addObject, update: .all)
+                realm.add(addObject)
             }
         } catch let error {
             NCCommunicationCommon.shared.writeLog("Could not write to database: \(error)")

+ 1 - 1
iOSClient/Diagnostics/NCCapabilitiesViewController.swift

@@ -224,7 +224,7 @@ class NCCapabilitiesViewController: UIViewController, UIDocumentInteractionContr
             statusFileSharing.text = NSLocalizedString("_not_available_", comment: "")
         }
         
-        if NCManageDatabase.sharedInstance.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesExternalSitesExists, exists: false) {
+        if NCManageDatabase.sharedInstance.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesExternalSitesExists, exists: true) {
             statusExternalSite.text = "✓ " + NSLocalizedString("_available_", comment: "")
         } else {
             statusExternalSite.text = NSLocalizedString("_not_available_", comment: "")

+ 1 - 1
iOSClient/Networking/NCService.swift

@@ -184,7 +184,7 @@ class NCService: NSObject {
                     }
                 }
                 
-                let isExternalSitesServerEnabled = NCManageDatabase.sharedInstance.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesExternalSitesExists, exists: false)
+                let isExternalSitesServerEnabled = NCManageDatabase.sharedInstance.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesExternalSitesExists, exists: true)
                 if (isExternalSitesServerEnabled) {
                     NCCommunication.shared.getExternalSite() { (account, externalSites, errorCode, errorDescription) in
                         if errorCode == 0 && account == self.appDelegate.account {