Files
real-e-party-iOS/YuMi/Modules/YMMonents/Model/MonentsCommentReplyModel.m
edwinQQQ a35a711be6 chore: Initial clean commit
- Removed YuMi/Library/ (138 MB, not tracked)
- Removed YuMi/Resources/ (23 MB, not tracked)
- Removed old version assets (566 files, not tracked)
- Excluded Pods/, xcuserdata/ and other build artifacts
- Clean repository optimized for company server deployment
2025-10-09 16:19:14 +08:00

35 lines
1.0 KiB
Objective-C

//
// MonentsCommentReplyModel.m
// YUMI
//
// Created by YUMI on 2022/6/22.
//
#import "MonentsCommentReplyModel.h"
#import "DJDKMIMOMColor.h"
#import "QEmotionHelper.h"
@implementation MonentsCommentReplyModel
+ (NSDictionary *)objectClassInArray {
return @{@"replyList": MonentsReplyModel.class};
}
@end
@implementation MonentsReplyModel
- (void)createContentAttribute {
if (self.contentAttribute == nil) {
QEmotionHelper *faceManager = [QEmotionHelper sharedEmotionHelper];
NSString * toNick = [NSString stringWithFormat:@"@%@", _toNick];
NSString *title = [NSString stringWithFormat:@"%@%@",toNick, _content.length > 0 ? _content : @""];
NSMutableAttributedString * attribute = [faceManager attributedStringByText:title font:[UIFont systemFontOfSize:15]];
if ([attribute.string containsString:toNick]) {
NSRange range = [attribute.string rangeOfString:toNick];
[attribute addAttribute:NSForegroundColorAttributeName value:[DJDKMIMOMColor appMainColor] range:range];
}
self.contentAttribute = attribute;
}
}
@end