41 lines
1.1 KiB
Objective-C
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
|