Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarinofaggiana <marino@marinofaggiana.com>2020-11-30 14:18:44 +0300
committermarinofaggiana <marino@marinofaggiana.com>2020-11-30 14:18:44 +0300
commit05a55a0eb63230d1870b54171210c89b7487759c (patch)
tree22e1069492ea441caaa896d21a8f6ec4c4a469dc /iOSClient/Data
parentab15fb5b59f7d1100df97f937705babef4118612 (diff)
#1495
Diffstat (limited to 'iOSClient/Data')
-rw-r--r--iOSClient/Data/NCManageDatabase.swift16
1 files changed, 16 insertions, 0 deletions
diff --git a/iOSClient/Data/NCManageDatabase.swift b/iOSClient/Data/NCManageDatabase.swift
index 81f4310f1..5bb014010 100644
--- a/iOSClient/Data/NCManageDatabase.swift
+++ b/iOSClient/Data/NCManageDatabase.swift
@@ -1277,6 +1277,22 @@ class NCManageDatabase: NSObject {
setDirectory(synchronized: false, serverUrl: serverUrl, account: account)
}
}
+
+ @objc func removeAllDirectoriesSynchronized(account: String) {
+
+ let realm = try! Realm()
+
+ do {
+ try realm.safeWrite {
+ let results = realm.objects(tableDirectory.self).filter("account == %@ AND synchronized == true", account)
+ for result in results {
+ result.synchronized = false
+ }
+ }
+ } catch let error {
+ NCCommunicationCommon.shared.writeLog("Could not write to database: \(error)")
+ }
+ }
//MARK: -
//MARK: Table e2e Encryption