diff --git a/iOSClient/Database/NCManageDatabase.swift b/iOSClient/Database/NCManageDatabase.swift index 1ee2af34d5..9f491965e6 100644 --- a/iOSClient/Database/NCManageDatabase.swift +++ b/iOSClient/Database/NCManageDatabase.swift @@ -1373,7 +1373,7 @@ class NCManageDatabase: NSObject { //MARK: Table Metadata @objc func addMetadata(_ metadata: tableMetadata) -> tableMetadata? { - + guard self.getAccountActive() != nil else { return nil } diff --git a/iOSClient/Library/SwiftWebVC/SwiftWebVC.swift b/iOSClient/Library/SwiftWebVC/SwiftWebVC.swift index 4feaa080c3..2703e67105 100755 --- a/iOSClient/Library/SwiftWebVC/SwiftWebVC.swift +++ b/iOSClient/Library/SwiftWebVC/SwiftWebVC.swift @@ -103,6 +103,8 @@ public class SwiftWebVC: UIViewController { self.init() self.request = aRequest self.request.addValue("true", forHTTPHeaderField: "OCS-APIRequest") + let language = NSLocale.preferredLanguages[0] as String + self.request.addValue(language, forHTTPHeaderField: "Accept-Language") self.hideToolbar = hideToolbar } diff --git a/iOSClient/Security/NCEndToEndMetadata.swift b/iOSClient/Security/NCEndToEndMetadata.swift index 1e91e63eb0..deb87bd7e2 100644 --- a/iOSClient/Security/NCEndToEndMetadata.swift +++ b/iOSClient/Security/NCEndToEndMetadata.swift @@ -219,7 +219,9 @@ class NCEndToEndMetadata : NSObject { // Update metadata on tableMetadata metadata?.fileNameView = encryptedFileAttributes.filename CCUtility.insertTypeFileIconName(encryptedFileAttributes.filename, metadata: metadata) - let _ = NCManageDatabase.sharedInstance.addMetadata(metadata!) + DispatchQueue.main.async { + _ = NCManageDatabase.sharedInstance.addMetadata(metadata!) + } } } catch let error {