关闭公屏可以使用
This commit is contained in:
@@ -70,6 +70,8 @@
|
||||
return [self createCandyTreeHighLevelAttribute:attachment];
|
||||
} else if(first == CustomMessageType_Arrange_Mic) {
|
||||
return [self createArrangeMicAttribute:attachment];
|
||||
}else if(first == CustomMessageType_Update_RoomInfo) {
|
||||
return [self createRoomInfoUpdateAttribute:attachment];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@@ -137,9 +139,7 @@
|
||||
[self attributeAddHihtLight:attribute uid:message.from.integerValue];
|
||||
return attribute;
|
||||
}
|
||||
case NIMChatroomEventTypeInfoUpdated:///房间信息更新
|
||||
return [self createRoomInfoUpdateAttribute:content.notifyExt];
|
||||
|
||||
break;
|
||||
default:
|
||||
return nil;
|
||||
}
|
||||
@@ -147,7 +147,22 @@
|
||||
|
||||
#pragma mark - 房间信息更新
|
||||
///房间信息更新
|
||||
- (NSAttributedString*)createRoomInfoUpdateAttribute:(NSString *)notifyExt {
|
||||
- (NSAttributedString*)createRoomInfoUpdateAttribute:(AttachmentModel *)attachment {
|
||||
if (attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState) {
|
||||
NSDictionary * dic= attachment.data[@"roomInfo"];
|
||||
if (dic.allKeys.count <=0) {
|
||||
dic = attachment.data;
|
||||
}
|
||||
RoomInfoModel * roomInfo = [RoomInfoModel modelWithDictionary:dic];
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"消息:" color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
if (roomInfo.isCloseScreen) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"管理员已关闭聊天公屏" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else {
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"管理员已开启聊天公屏" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
return attribute;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user