0
0
mirror of https://github.com/etesync/android.git synced 2024-09-19 20:32:17 +02:00

Sync: don't override item UID if already set.

This fixes an issue with tasks.org tasks getting mangled.
Fixes #161 and potentially fixes #159.
This commit is contained in:
Tom Hacohen 2020-12-15 12:44:28 +02:00
parent 784fb7ee82
commit 4e472e5ff3

View File

@ -651,7 +651,7 @@ constructor(protected val context: Context, protected val account: Account, prot
item = cacheItem.item
itemUpdateMtime(item)
} else {
val uid = UUID.randomUUID().toString()
val uid = local.uuid ?: UUID.randomUUID().toString()
val meta = ItemMetadata()
meta.name = uid
meta.mtime = System.currentTimeMillis()