Expanded comments and cleaned up more TODO's. Just a couple of bug fixes left in RestKit and styling work on this app!

This commit is contained in:
Blake Watters
2011-01-20 21:15:40 -05:00
parent ebd23559bb
commit 35df41ec25
10 changed files with 44 additions and 27 deletions

View File

@@ -62,7 +62,6 @@
_bodyTextEditor.text = _post.body;
// Ensure we are authenticated
NSLog(@"All the users are: %@", [DBUser allObjects]);
[self presentLoginViewControllerIfNecessary];
}
@@ -77,8 +76,7 @@
if (_newAttachment) {
// has new attachment. show it. allow update.
[items addObject:[TTTableImageItem itemWithText:@"Tap to Replace Image" imageURL:@"" defaultImage:_newAttachment URL:@"db://updateAttachment"]];
} else if (![[_post attachmentPath] isWhitespaceAndNewlines]) {
// TODO: Create model method to determine if there is an attachment
} else if ([_post hasAttachment]) {
// Has existing attachment. allow replace
NSString* url = _post.attachmentPath;
[items addObject:[TTTableImageItem itemWithText:@"Tap to Replace Image" imageURL:url defaultImage:nil URL:@"db://updateAttachment"]];
@@ -153,11 +151,9 @@
#pragma mark RKObjectLoaderDelegate methods
- (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects {
NSLog(@"Loaded Objects: %@", objects);
NSLog(@"Status Code: %d", objectLoader.response.statusCode);
// Post notification telling view controllers to reload.
// TODO: Generalize this notification
[[NSNotificationCenter defaultCenter] postNotificationName:kObjectCreatedUpdatedOrDestroyedNotificationName object:objects];
[[NSNotificationCenter defaultCenter] postNotificationName:DBContentObjectDidChangeNotification object:[objects lastObject]];
[self.navigationController popViewControllerAnimated:YES];
}