Improve deleting occurences of recurrent events

This commit is contained in:
Francis Lachapelle
2014-02-04 16:25:52 -05:00
parent 4e42d5d410
commit ef1be5dc5f
25 changed files with 173 additions and 91 deletions
+8 -2
View File
@@ -788,16 +788,22 @@ static NSArray *childRecordFields = nil;
- (void) deleteEntriesWithIds: (NSArray *) ids
{
unsigned int count, max;
NSString *currentID;
NSEnumerator *names;
NSString *currentID, *currentName;
SOGoContentObject *deleteObject;
max = [ids count];
for (count = 0; count < max; count++)
{
currentID = [ids objectAtIndex: count];
deleteObject = [self lookupName: currentID
names = [[currentID componentsSeparatedByString: @"/"] objectEnumerator];
deleteObject = self;
while ((currentName = [names nextObject]))
{
deleteObject = [deleteObject lookupName: currentName
inContext: context
acquire: NO];
}
if (![deleteObject isKindOfClass: [NSException class]])
{
if ([deleteObject respondsToSelector: @selector (prepareDelete)])