Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
move fix to method changeDescription
Signed-off-by: Maximilian Martin <[email protected]>
Signed-off-by: Richard Steinmetz <[email protected]>
  • Loading branch information
max65482 authored and st3iny committed Jan 28, 2022
commit 88645fdd09384c994b717d7c733a73cab1520601
20 changes: 8 additions & 12 deletions src/store/calendarObjectInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ const mutations = {
* @param {string} data.description New description to set
*/
changeDescription(state, { calendarObjectInstance, description }) {
// ALTREP parameter is not set by NC calendar, but by CalDAV clients like Thunderbird.
// To avoid inconsistencies, remove ALTREP parameter upon modification.
const descriptionProperty = calendarObjectInstance.eventComponent.getFirstProperty('Description')
if (descriptionProperty) {
if (descriptionProperty.hasParameter('ALTREP')) {
descriptionProperty.deleteParameter('ALTREP')
}
}
calendarObjectInstance.eventComponent.description = description
calendarObjectInstance.description = description
},
Expand Down Expand Up @@ -1518,18 +1526,6 @@ const actions = {
const calendarObject = state.calendarObject

if (eventComponent.isDirty()) {
// ALTREP parameter is not set by NC calendar, but by CalDAV clients like Thunderbird.
// To avoid inconsistencies, remove ALTREP parameter upon modification.
const veventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT')
if (veventComponent) {
const descriptionProperty = veventComponent.getFirstProperty('Description')
if (descriptionProperty) {
if (descriptionProperty.hasParameter('ALTREP')) {
descriptionProperty.deleteParameter('ALTREP')
}
}
}

const isForkedItem = eventComponent.primaryItem !== null
let original = null
let fork = null
Expand Down