Skip to content

Commit

Permalink
Removed location selection in user profile. Closes dennisreimann#72
Browse files Browse the repository at this point in the history
  • Loading branch information
dbloete committed Jul 30, 2010
1 parent 2a8e7d5 commit 1279bdb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Classes/UserController.m
Expand Up @@ -159,8 +159,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
case 2: cell = emailCell; break;
default: cell = nil;
}
cell.selectionStyle = cell.hasContent ? UITableViewCellSelectionStyleBlue : UITableViewCellSelectionStyleNone;
cell.accessoryType = cell.hasContent ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;
BOOL isSelectable = row != 0 && cell.hasContent;
cell.selectionStyle = isSelectable ? UITableViewCellSelectionStyleBlue : UITableViewCellSelectionStyleNone;
cell.accessoryType = isSelectable ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;
return cell;
}
if (section == 1 && row == 0) return recentActivityCell;
Expand All @@ -182,12 +183,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
NSInteger section = indexPath.section;
NSInteger row = indexPath.row;
UIViewController *viewController = nil;
if (section == 0 && row == 0 && user.location) {
NSString *locationQuery = [user.location stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *url = [NSString stringWithFormat:@"http://maps.google.com/maps?q=%@", locationQuery];
NSURL *locationURL = [NSURL URLWithString:url];
[[UIApplication sharedApplication] openURL:locationURL];
} else if (section == 0 && row == 1 && user.blogURL) {
if (section == 0 && row == 1 && user.blogURL) {
viewController = [[WebController alloc] initWithURL:user.blogURL];
} else if (section == 0 && row == 2 && user.email) {
NSString *mailString = [NSString stringWithFormat:@"mailto:%@", user.email];
Expand Down

0 comments on commit 1279bdb

Please sign in to comment.