[Calendar] Update plusieur fois

This commit is contained in:
Haja 2025-04-25 11:14:47 +03:00
parent 10b6cb9837
commit 20606f825c
10 changed files with 19 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1802,7 +1802,8 @@ const actions = {
if (isForkedItem && eventComponent.canCreateRecurrenceExceptions()) { if (isForkedItem && eventComponent.canCreateRecurrenceExceptions()) {
[original, fork] = eventComponent.createRecurrenceException(thisAndAllFuture) [original, fork] = eventComponent.createRecurrenceException(thisAndAllFuture)
} }
await dispatch('updateCalendarObject', { calendarObject })
await dispatch('updateCalendarObject', { calendarObject, eventComponent })
if (original !== null && fork !== null && original.root !== fork.root) { if (original !== null && fork !== null && original.root !== fork.root) {
await dispatch('createCalendarObjectFromFork', { await dispatch('createCalendarObjectFromFork', {

View File

@ -223,8 +223,11 @@ const actions = {
* @param {CalendarObject} data.calendarObject Calendar-object to delete * @param {CalendarObject} data.calendarObject Calendar-object to delete
* @return {Promise<void>} * @return {Promise<void>}
*/ */
async updateCalendarObject(context, { calendarObject }) { async updateCalendarObject(context, { calendarObject, eventComponent }) {
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT'); if(!eventComponent) {
eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
}
if (calendarObject.existsOnServer) { if (calendarObject.existsOnServer) {
let icsValue = calendarObject.calendarComponent.toICS(); let icsValue = calendarObject.calendarComponent.toICS();