公屏消息、资料卡增加贵族icon
This commit is contained in:
@@ -94,15 +94,22 @@
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
///官方新用户
|
||||
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser]];
|
||||
if (model.vipIcon) {//贵族icon
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if (model.experUrl) {
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
|
||||
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) {
|
||||
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //铭牌有图片加文字
|
||||
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
} else if (model.inRoomNameplatePic.length > 0) {//铭牌只有图片
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:nick color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:message.text color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
@@ -130,6 +137,14 @@
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
|
||||
XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithDictionary:dic];
|
||||
if (extModel.vipIcon.length > 0) {//贵族icon
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if (extModel.experUrl.length > 0) {//等级
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
|
||||
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
|
Reference in New Issue
Block a user