From 9fd3a914fee6c22d7d7148ca100df72aa7cfc74e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 27 Mar 2017 01:47:46 +0300 Subject: update images again, fix reply count --- Juick/Views/MessageCell.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Juick/Views/MessageCell.m') diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m index 13f33a5..2d34029 100644 --- a/Juick/Views/MessageCell.m +++ b/Juick/Views/MessageCell.m @@ -30,14 +30,13 @@ formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss"; [formatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; - self.timestamp.text = [[formatter dateFromString:msg.timestamp] timeAgo]; - if (msg.repliesCount > 0) { + self.timestamp.text = [[formatter dateFromString:msg.timestamp] timeAgoSinceNow]; + NSUInteger count = [msg.repliesCount unsignedIntegerValue]; + if (count > 0) { if ([msg.repliesBy length] > 0) { self.summary.text = [NSString stringWithFormat:@"%@ replies by %@", msg.repliesCount, msg.repliesBy]; } else { - if (msg.repliesCount > 0) { - self.summary.text = [NSString stringWithFormat:@"%@ replies", msg.repliesCount]; - } + self.summary.text = [NSString stringWithFormat:@"%@ replies", msg.repliesCount]; } } else { self.summary.text = nil; -- cgit v1.2.3