Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Commit

Permalink
Inverted the logic of taps in the accounts controller, to make it mor…
Browse files Browse the repository at this point in the history
…e coherent to the rest of the controllers
  • Loading branch information
Adrian Kosmaczewski committed Sep 30, 2011
1 parent 7cbcbd2 commit 4c97c61
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions Classes/Controllers/SBRootController.m
Expand Up @@ -387,6 +387,17 @@ - (void)tabBarController:(UITabBarController *)tabBarController
#pragma mark - BaseListControllerDelegate methods

- (void)listController:(SBListController *)controller didSelectEntity:(SBBaseEntity *)entity
{
if (self.commentsController == nil)
{
self.commentsController = [[[SBCommentsController alloc] init] autorelease];
}
self.commentsController.entity = entity;
[controller.navigationController pushViewController:self.commentsController
animated:YES];
}

- (void)listController:(SBListController *)controller didTapAccessoryForEntity:(SBBaseEntity *)entity
{
if (controller == self.contactsController)
{
Expand All @@ -399,29 +410,6 @@ - (void)listController:(SBListController *)controller didSelectEntity:(SBBaseEnt
[controller.navigationController pushViewController:personController animated:YES];
[personController release];
}
else
{
if (self.commentsController == nil)
{
self.commentsController = [[[SBCommentsController alloc] init] autorelease];
}
self.commentsController.entity = entity;
[controller.navigationController pushViewController:self.commentsController
animated:YES];
}
}

- (void)listController:(SBListController *)controller didTapAccessoryForEntity:(SBBaseEntity *)entity
{
if (controller == self.contactsController)
{
if (self.commentsController == nil)
{
self.commentsController = [[[SBCommentsController alloc] init] autorelease];
}
self.commentsController.entity = entity;
[controller.navigationController pushViewController:self.commentsController animated:YES];
}
}

#pragma mark - ABPersonViewControllerDelegate methods
Expand Down

0 comments on commit 4c97c61

Please sign in to comment.