From 4edb87978b9c897a27a18b527a06daa84fffad1c Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 25 Nov 2015 15:53:08 -0500 Subject: [PATCH] (fix) correctly handle all-day event exceptions when the master event changes --- NEWS | 1 + SOPE/NGCards/iCalEntityObject.m | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 48b6f58e3..99d771f52 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ Bug fixes - JavaScript exception when printing events from calendars with no assigned color (#3203) - EAS fix for wrong charset being used (#3392) - EAS fix on qp-encoded subjects (#3390) + - correctly handle all-day event exceptions when the master event changes 2.3.3a (2015-11-18) ------------------- diff --git a/SOPE/NGCards/iCalEntityObject.m b/SOPE/NGCards/iCalEntityObject.m index 5c5af1859..8d8b222db 100644 --- a/SOPE/NGCards/iCalEntityObject.m +++ b/SOPE/NGCards/iCalEntityObject.m @@ -27,6 +27,7 @@ #import "NSCalendarDate+NGCards.h" #import "iCalAlarm.h" +#import "iCalCalendar.h" #import "iCalDateTime.h" #import "iCalEntityObject.h" #import "iCalEvent.h" @@ -268,9 +269,12 @@ - (void) setRecurrenceId: (NSCalendarDate *) newRecId { iCalDateTime* recurrenceId; + BOOL isMasterAllDay; + + isMasterAllDay = [[[[self parent] events] objectAtIndex: 0] isAllDay]; recurrenceId = (iCalDateTime *) [self uniqueChildWithTag: @"recurrence-id"]; - if ([self isKindOfClass: [iCalEvent class]] && [(iCalEvent *)self isAllDay]) + if ([self isKindOfClass: [iCalEvent class]] && isMasterAllDay) [recurrenceId setDate: newRecId]; else [recurrenceId setDateTime: newRecId];