summaryrefslogtreecommitdiff
path: root/Juick/MasterViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-11-03 06:08:35 +0400
committerGravatar Vitaly Takmazov2013-11-03 06:08:35 +0400
commit08574251153406e4755f58c2ee5548ee32e308fb (patch)
tree26325a6adace092e919234064b0446c3a80812a1 /Juick/MasterViewController.m
parent6dfbafe71aba41bdcf8aba331c1c193c88b42561 (diff)
avatars
Diffstat (limited to 'Juick/MasterViewController.m')
-rw-r--r--Juick/MasterViewController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Juick/MasterViewController.m b/Juick/MasterViewController.m
index 26035cd..4ed8df1 100644
--- a/Juick/MasterViewController.m
+++ b/Juick/MasterViewController.m
@@ -127,6 +127,7 @@ static NSString *CellIdentifier = @"MessageCell";
MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
[cell updateFonts];
Message *msg = [_messages objectAtIndex:indexPath.row];
+ [cell.avatar setImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://i.juick.com/as/%@.png", msg.userID]]]]];
cell.titleLabel.text = msg.user;
cell.bodyLabel.text = msg.text;
[cell setNeedsUpdateConstraints];
@@ -136,11 +137,13 @@ static NSString *CellIdentifier = @"MessageCell";
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
+
MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
[cell updateFonts];
Message *msg = [_messages objectAtIndex:indexPath.row];
+ [cell.avatar setImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://i.juick.com/as/%@.png", msg.userID]]]]];
cell.titleLabel.text = msg.user;
cell.bodyLabel.text = msg.text;