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.
pull/129/head^2
Tom Hacohen 3 years ago
parent 784fb7ee82
commit 4e472e5ff3

@ -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()

Loading…
Cancel
Save