3
This commit is contained in:
@@ -68,13 +68,16 @@
|
||||
NSTimeInterval interval = [[NSDate date] timeIntervalSinceDate:date];
|
||||
|
||||
if (interval < 60) {
|
||||
return @"刚刚";
|
||||
return KBLocalized(@"Just now");
|
||||
} else if (interval < 3600) {
|
||||
return [NSString stringWithFormat:@"%.0f分钟前", interval / 60];
|
||||
return [NSString stringWithFormat:KBLocalized(@"%.0f minutes ago"),
|
||||
interval / 60];
|
||||
} else if (interval < 86400) {
|
||||
return [NSString stringWithFormat:@"%.0f小时前", interval / 3600];
|
||||
return [NSString stringWithFormat:KBLocalized(@"%.0f hours ago"),
|
||||
interval / 3600];
|
||||
} else if (interval < 86400 * 30) {
|
||||
return [NSString stringWithFormat:@"%.0f天前", interval / 86400];
|
||||
return [NSString stringWithFormat:KBLocalized(@"%.0f days ago"),
|
||||
interval / 86400];
|
||||
} else {
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
formatter.dateFormat = @"MM-dd";
|
||||
@@ -95,7 +98,8 @@
|
||||
// 用户名高度(可能包含 "回复 @xxx")
|
||||
NSMutableString *userNameText = [NSMutableString stringWithString:self.userName ?: @""];
|
||||
if (self.replyToUserName.length > 0) {
|
||||
[userNameText appendFormat:@" 回复 @%@", self.replyToUserName];
|
||||
[userNameText appendFormat:@" %@ @%@", KBLocalized(@"Reply"),
|
||||
self.replyToUserName];
|
||||
}
|
||||
UIFont *userNameFont = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
|
||||
CGRect userNameRect = [userNameText boundingRectWithSize:CGSizeMake(contentWidth, CGFLOAT_MAX)
|
||||
|
||||
Reference in New Issue
Block a user