Event and contact: update last modified.

master
Tom Hacohen 7 years ago
parent de3f96a10d
commit c51804d7fe

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

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

2
src/ical.js.d.ts vendored

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

Loading…
Cancel
Save