Event and contact: update last modified.

master
Tom Hacohen 2017-12-13 15:22:00 +00:00
parent de3f96a10d
commit c51804d7fe
3 changed files with 5 additions and 0 deletions

View File

@ -259,6 +259,7 @@ class ContactEdit extends React.Component {
comp.updatePropertyWithValue('version', '4.0');
comp.updatePropertyWithValue('uid', this.state.uid);
comp.updatePropertyWithValue('fn', this.state.fn);
comp.updatePropertyWithValue('rev', ICAL.Time.now());
function setProperties(name: string, source: ValueType[]) {
comp.removeAllProperties(name);

View File

@ -135,6 +135,8 @@ class EventEdit extends React.Component {
event.location = this.state.location;
event.description = this.state.description;
event.component.updatePropertyWithValue('last-modified', ICAL.Time.now());
this.props.onSave(event, this.state.journalUid, this.props.event);
}

2
src/ical.js.d.ts vendored
View File

@ -60,6 +60,8 @@ declare module 'ical.js' {
static fromString(str: string): Time;
static now(): Time;
constructor(data?: {
year?: number,
month?: number,