Files
peko-ios/YuMi/Modules/YMRoom/View/MessageContainerView/Model/XPMessageInfoModel.m
2024-05-16 14:30:21 +08:00

41 lines
1.1 KiB
Objective-C

//
// YMMessageInfoModel.m
// YUMI
//
// Created by YUMI on 2022/10/21.
//
#import "XPMessageInfoModel.h"
#import "XPRoomMessageConstant.h"
@implementation XPMessageInfoModel
- (instancetype)init {
if ([super init]) {
self.contentLeftMargin = 12;
self.contentRightMargin = 0;
self.contentTopMargin = 10;
self.contentBottomMargin = 10;
self.cellBottomMargin = 6;
self.isUpdateContentFrame = NO;
self.isHiddenBubble = NO;
}
return self;
}
- (void)setContent:(NSAttributedString *)content {
_content = content;
// CGFloat width = isMSRTL() ? 10 : 0;
//// width = self.vipIcon.length > 0 ? width + 15 : width;
// CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth - self.contentLeftMargin - self.contentRightMargin - 12, MAXFLOAT);
// YYTextContainer *container = [YYTextContainer containerWithSize:maxSize];
// container.maximumNumberOfRows = 0;
// YYTextLayout *layout = [YYTextLayout layoutWithContainer:container text:self.content];
// CGFloat rowHeight = layout.textBoundingSize.height + self.contentTopMargin + self.contentBottomMargin + self.cellBottomMargin;
// self.rowHeight = rowHeight + width ;
}
@end