1
0
mirror of https://github.com/etesync/android synced 2025-01-03 12:21:01 +00: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 item = cacheItem.item
itemUpdateMtime(item) itemUpdateMtime(item)
} else { } else {
val uid = UUID.randomUUID().toString() val uid = local.uuid ?: UUID.randomUUID().toString()
val meta = ItemMetadata() val meta = ItemMetadata()
meta.name = uid meta.name = uid
meta.mtime = System.currentTimeMillis() meta.mtime = System.currentTimeMillis()