summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views')
-rw-r--r--Juick/Views/MessageCell.m9
1 files changed, 4 insertions, 5 deletions
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;