Use transaction instead of batch

pull/1244/head
Alex Baker 5 years ago
parent 09e0fb0c3b
commit ea7aeb3afd

@ -90,17 +90,10 @@ class EteBaseClient(
suspend fun uploadChanges(collection: Collection, items: List<Item>) {
val itemManager = etebase.collectionManager.getItemManager(collection)
withContext(Dispatchers.IO) {
itemManager.batch(items.toTypedArray())
itemManager.transaction(items.toTypedArray())
}
}
suspend fun getItem(collection: Collection, uid: String): Item? =
cache.itemGet(
etebase.collectionManager.getItemManager(collection),
collection.uid,
uid
)
suspend fun logout() {
try {
EtebaseLocalCache.clear(context, username)

Loading…
Cancel
Save