From 0d6f7d5ed867e2b999b45a0948ef65f969c6ccbf Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 1 Oct 2020 11:38:12 +0300 Subject: [PATCH] CollectionEdit: update mtime when editing and deleting collections. --- src/Collections/CollectionEdit.tsx | 3 ++- src/Collections/Main.tsx | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Collections/CollectionEdit.tsx b/src/Collections/CollectionEdit.tsx index 7b0d6f7..27ffb86 100644 --- a/src/Collections/CollectionEdit.tsx +++ b/src/Collections/CollectionEdit.tsx @@ -91,7 +91,8 @@ export default function CollectionEdit(props: PropsType) { } const colMgr = getCollectionManager(etebase); - const meta = { ...info, color }; + const mtime = (new Date()).getTime(); + const meta = { ...info, color, mtime }; let collection; if (props.collection) { collection = props.collection.collection; diff --git a/src/Collections/Main.tsx b/src/Collections/Main.tsx index 9ff2abb..edd375c 100644 --- a/src/Collections/Main.tsx +++ b/src/Collections/Main.tsx @@ -54,6 +54,9 @@ export default function CollectionsMain() { async function onDelete(collection: Etebase.Collection) { const colMgr = getCollectionManager(etebase); + const mtime = (new Date()).getTime(); + const meta = await collection.getMeta(); + await collection.setMeta({ ...meta, mtime }); await collection.delete(true); await dispatch(collectionUpload(colMgr, collection));