Move removed account cleanup to background

This commit is contained in:
Ali 2022-02-03 15:22:21 +04:00
parent b91b00b068
commit 49b656b125

View File

@ -390,6 +390,7 @@ public func managedCleanupAccounts(networkArguments: NetworkInitializationArgume
validPaths.insert("\(accountRecordIdPathName(record.id))")
}
DispatchQueue.global(qos: .utility).async {
if let files = try? FileManager.default.contentsOfDirectory(at: URL(fileURLWithPath: rootPath), includingPropertiesForKeys: [], options: []) {
for url in files {
if url.lastPathComponent.hasPrefix("account-") {
@ -399,6 +400,7 @@ public func managedCleanupAccounts(networkArguments: NetworkInitializationArgume
}
}
}
}
})
return ActionDisposable {