зеркало из https://github.com/nextcloud/ios.git
Add Accept-Language on flow Login
This commit is contained in:
Родитель
cae4346ca4
Коммит
a1a32ac42f
|
@ -1373,7 +1373,7 @@ class NCManageDatabase: NSObject {
|
|||
//MARK: Table Metadata
|
||||
|
||||
@objc func addMetadata(_ metadata: tableMetadata) -> tableMetadata? {
|
||||
|
||||
|
||||
guard self.getAccountActive() != nil else {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче