|
@@ -1696,6 +1696,7 @@ class NCManageDatabase: NSObject {
|
|
let addObject = tableLocalFile()
|
|
let addObject = tableLocalFile()
|
|
|
|
|
|
addObject.account = metadata.account
|
|
addObject.account = metadata.account
|
|
|
|
+ addObject.date = NSDate()
|
|
addObject.etag = metadata.etag
|
|
addObject.etag = metadata.etag
|
|
addObject.exifDate = NSDate()
|
|
addObject.exifDate = NSDate()
|
|
addObject.exifLatitude = "-1"
|
|
addObject.exifLatitude = "-1"
|
|
@@ -1796,6 +1797,20 @@ class NCManageDatabase: NSObject {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @objc func setLocalFileDate(ocId: String) {
|
|
|
|
+
|
|
|
|
+ let realm = try! Realm()
|
|
|
|
+
|
|
|
|
+ do {
|
|
|
|
+ try realm.safeWrite {
|
|
|
|
+ let result = realm.objects(tableLocalFile.self).filter("ocId == %@", ocId).first
|
|
|
|
+ result?.date = NSDate()
|
|
|
|
+ }
|
|
|
|
+ } catch let error {
|
|
|
|
+ NCCommunicationCommon.shared.writeLog("Could not write to database: \(error)")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//MARK: -
|
|
//MARK: -
|
|
//MARK: Table Metadata
|
|
//MARK: Table Metadata
|
|
|
|
|