1
0
mirror of https://github.com/etesync/android synced 2024-12-23 15:18:14 +00:00

CollectionEdit: update mtime when editing and deleting collections.

This commit is contained in:
Tom Hacohen 2020-10-01 11:47:00 +03:00
parent a632ab9cf7
commit 82ce1783bc

View File

@ -155,6 +155,9 @@ class EditCollectionFragment(private val cachedCollection: CachedCollection, pri
doAsync { doAsync {
try { try {
val col = cachedCollection.col val col = cachedCollection.col
val meta = col.meta
meta.mtime = System.currentTimeMillis()
col.meta = meta
col.delete() col.delete()
uploadCollection(col) uploadCollection(col)
val applicationContext = activity?.applicationContext val applicationContext = activity?.applicationContext
@ -194,6 +197,8 @@ class EditCollectionFragment(private val cachedCollection: CachedCollection, pri
edit = v.findViewById<EditText>(R.id.description) edit = v.findViewById<EditText>(R.id.description)
meta.description = StringUtils.trimToNull(edit.text.toString()) meta.description = StringUtils.trimToNull(edit.text.toString())
meta.mtime = System.currentTimeMillis()
if (ok) { if (ok) {
when (meta.collectionType) { when (meta.collectionType) {
Constants.ETEBASE_TYPE_CALENDAR, Constants.ETEBASE_TYPE_TASKS -> { Constants.ETEBASE_TYPE_CALENDAR, Constants.ETEBASE_TYPE_TASKS -> {