Fix setting of mtime for newly created items.

master
Tom Hacohen 4 years ago
parent 26788cc749
commit 059522532a

@ -65,7 +65,7 @@ export default function CalendarsMain() {
const collection = collections!.find((x) => x.uid === collectionUid)!;
const itemMgr = colMgr.getItemManager(collection);
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const content = item.toIcal();
let eteItem;
@ -95,7 +95,7 @@ export default function CalendarsMain() {
const itemMgr = colMgr.getItemManager(collection);
const eteItem = items!.get(collectionUid)?.get(itemUid)!;
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const meta = await eteItem.getMeta();
meta.mtime = mtime;
await eteItem.setMeta(meta);

@ -61,7 +61,7 @@ export default function ImportDialog(props: PropsType) {
const eteItems = [];
for (const item of items) {
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const meta = {
mtime,
name: item.uid,

@ -61,7 +61,7 @@ export default function ContactsMain() {
const collection = collections!.find((x) => x.uid === collectionUid)!;
const itemMgr = colMgr.getItemManager(collection);
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const content = item.toIcal();
let eteItem;
@ -91,7 +91,7 @@ export default function ContactsMain() {
const itemMgr = colMgr.getItemManager(collection);
const eteItem = items!.get(collectionUid)?.get(itemUid)!;
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const meta = await eteItem.getMeta();
meta.mtime = mtime;
await eteItem.setMeta(meta);

@ -61,7 +61,7 @@ export default function TasksMain() {
const collection = collections!.find((x) => x.uid === collectionUid)!;
const itemMgr = colMgr.getItemManager(collection);
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const content = item.toIcal();
let eteItem;
@ -91,7 +91,7 @@ export default function TasksMain() {
const itemMgr = colMgr.getItemManager(collection);
const eteItem = items!.get(collectionUid)?.get(itemUid)!;
const mtime = (new Date()).getUTCMilliseconds();
const mtime = (new Date()).getTime();
const meta = await eteItem.getMeta();
meta.mtime = mtime;
await eteItem.setMeta(meta);

Loading…
Cancel
Save