Monotone-Parent: 3d88bd203af6504eee5fcea3bde52990d2512a3a

Monotone-Revision: e2c0c29f57790c11b70402648fcea481f24b2a1b

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-12-03T16:18:12
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-12-03 16:18:12 +00:00
parent 6e6adf9038
commit 25ee135fdc
4 changed files with 163 additions and 35 deletions
+20 -2
View File
@@ -104,7 +104,7 @@
{
events = [[self inCalendar] events];
if ([events count] > 0)
inEvent = [[events objectAtIndex:0] retain];
inEvent = [[events objectAtIndex: 0] retain];
}
return inEvent;
@@ -262,7 +262,25 @@
{
if (!storedEvent)
{
storedEvent = [[self storedEventObject] component: NO secure: NO];
NSCalendarDate *recurrenceId;
recurrenceId = [[self inEvent] recurrenceId];
if (recurrenceId == nil)
storedEvent = [[self storedEventObject] component: NO secure: NO];
else
{
// Find the specific occurence within the repeating vEvent.
NSString *recurrenceTime;
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
storedEvent = (iCalEvent*)[[self storedEventObject] lookupOccurence: recurrenceTime];
if (storedEvent == nil)
// If no occurence found, create one
storedEvent = (iCalEvent*)[storedEventObject newOccurenceWithID: recurrenceTime];
}
[storedEvent retain];
}