37 lines
1.1 KiB
Objective-C
37 lines
1.1 KiB
Objective-C
//
|
|
// MonentsCommentReplyModel.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2022/6/22.
|
|
//
|
|
|
|
#import "MonentsCommentReplyModel.h"
|
|
#import "NSString+Utils.h"
|
|
#import "ThemeColor.h"
|
|
|
|
@implementation MonentsCommentReplyModel
|
|
+ (NSDictionary *)objectClassInArray {
|
|
return @{@"replyList": MonentsReplyModel.class};
|
|
}
|
|
@end
|
|
|
|
|
|
@implementation MonentsReplyModel
|
|
|
|
- (NSString *)publishTime {
|
|
return [NSString stringWithTimeStamp:_publishTime];
|
|
}
|
|
|
|
- (void)createContentAttribute {
|
|
if (self.contentAttribute == nil) {
|
|
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
|
[attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"@%@", _toNick] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[ThemeColor appMainColor]}]];
|
|
if (self.content.length > 0) {
|
|
[attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:_content attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[ThemeColor mainTextColor]}]];
|
|
}
|
|
self.contentAttribute = attribute;
|
|
}
|
|
}
|
|
|
|
@end
|