summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-03-27 01:47:46 +0300
committerGravatar Vitaly Takmazov2017-06-28 21:26:57 +0300
commit9fd3a914fee6c22d7d7148ca100df72aa7cfc74e (patch)
tree9a40469481a1af6d6555bafe5ff3e1388fa35fbe /Juick/Views
parent9f4b7a156a40769a0383911ab38e9ed09f986507 (diff)
update images again, fix reply count
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;