Minor formatting updates

This commit is contained in:
Saul Mora
2012-11-25 23:31:19 -07:00
parent cfccd407f4
commit 144062347c
2 changed files with 10 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ static NSString * const kMagicalRecordNSManagedObjectContextWorkingName = @"kNSM
- (NSString *) MR_parentChain;
{
NSMutableString *familyTree = [@"" mutableCopy];
NSMutableString *familyTree = [@"\n" mutableCopy];
NSManagedObjectContext *currentContext = self;
do
{
@@ -131,7 +131,7 @@ static NSString * const kMagicalRecordNSManagedObjectContextWorkingName = @"kNSM
NSManagedObjectContext *defaultContext = [self MR_newMainQueueContext];
[self MR_setDefaultContext:defaultContext];
[defaultContext setParentContext:rootSavingContext];
[defaultContext setParentContext:rootContext];
}
}
@@ -182,7 +182,7 @@ static NSString * const kMagicalRecordNSManagedObjectContextWorkingName = @"kNSM
[context setPersistentStoreCoordinator:coordinator];
}];
MRLog(@"-> Created %@", [context MR_description]);
MRLog(@"-> Created Context %@", [context MR_workingName]);
}
return context;
}

View File

@@ -24,7 +24,7 @@
{
if (![self hasChanges])
{
MRLog(@"NO CHANGES IN CONTEXT %@ - NOT SAVING", [self MR_description]);
MRLog(@"NO CHANGES IN ** %@ ** CONTEXT - NOT SAVING", [self MR_workingName]);
return;
}
@@ -72,16 +72,15 @@
{
[self performBlock:^{
[self MR_saveWithErrorCallback:errorCallback];
if (self.parentContext) {
if ([self parentContext])
{
[[self parentContext] performBlock:^{
[[self parentContext] MR_saveNestedContextsErrorHandler:errorCallback completion:completion];
}];
} else {
if (completion) {
dispatch_async(dispatch_get_main_queue(), ^{
completion();
});
}
else if (completion)
{
dispatch_async(dispatch_get_main_queue(), completion);
}
}];
}