mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-25 14:59:30 +00:00
(fix) make sure we handle events occurring after RRULE's UNTIL date
This commit is contained in:
1
NEWS
1
NEWS
@@ -23,6 +23,7 @@ Bug fixes
|
||||
- [core] honor groups when setting IMAP ACLs
|
||||
- [core] honor "any authenticated user" when setting IMAP ACLs
|
||||
- [core] avoid exceptions for RRULE with no DTSTART
|
||||
- [core] make sure we handle events occurring after RRULE's UNTIL date
|
||||
|
||||
4.0.8 (2019-07-19)
|
||||
------------------
|
||||
|
||||
@@ -175,6 +175,8 @@
|
||||
if ([self isRecurrent])
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
NSArray *events;
|
||||
iCalEvent *e;
|
||||
|
||||
date = [self lastPossibleRecurrenceStartDate];
|
||||
if (date)
|
||||
@@ -183,6 +185,22 @@
|
||||
/* this could also be *nil*, but in the end it makes the fetchspecs
|
||||
more complex - thus we set it to a "reasonable" distant future */
|
||||
date = iCalDistantFuture;
|
||||
|
||||
// We have to make sure that we don't have occurrences that are after
|
||||
// our -lastPossibleRecurrenceStartDate. We do that by walking through
|
||||
// the events list from the calendar component
|
||||
events = [[self parent] events];
|
||||
|
||||
for (i = 0; i < [events count]; i++)
|
||||
{
|
||||
e = [events objectAtIndex: i];
|
||||
if ([e recurrenceId] && [[e startDate] compare: date] == NSOrderedDescending)
|
||||
{
|
||||
date = [e startDate];
|
||||
date = [date addTimeInterval: [e durationAsTimeInterval]];
|
||||
}
|
||||
}
|
||||
|
||||
[row setObject: [self quickRecordDateAsNumber: date
|
||||
withOffset: 0 forAllDay: NO]
|
||||
forKey: @"c_cycleenddate"];
|
||||
|
||||
Reference in New Issue
Block a user