关闭公屏可以使用

This commit is contained in:
fengshuo
2021-12-25 16:57:50 +08:00
parent 23de6ab02e
commit 1abf40cea0
39 changed files with 498 additions and 139 deletions

View File

@@ -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;
}