From 0023a9ce3c4027bb32699efc5529a4a53d7699f6 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Fri, 17 Nov 2023 09:24:12 +0100 Subject: [PATCH] fix(calendar): do not let DURATION and DTEND be both present in vevent --- SOPE/NGCards/iCalEvent.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SOPE/NGCards/iCalEvent.m b/SOPE/NGCards/iCalEvent.m index 7d39064dc..8e192f438 100644 --- a/SOPE/NGCards/iCalEvent.m +++ b/SOPE/NGCards/iCalEvent.m @@ -72,8 +72,14 @@ - (void) setEndDate: (NSCalendarDate *) newEndDate { + CardElement *c; + [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"] setDateTime: newEndDate]; + + c = [self uniqueChildWithTag: @"duration"]; + if (c) + [self removeChild: c]; } - (NSCalendarDate *) endDate