排麦模式
This commit is contained in:
@@ -68,6 +68,8 @@
|
||||
return [self createKickUserAttribute:attachment info:kickModel];
|
||||
} else if(first == CustomMessageType_Candy_Tree ) {//糖果树
|
||||
return [self createCandyTreeHighLevelAttribute:attachment];
|
||||
} else if(first == CustomMessageType_Arrange_Mic) {
|
||||
return [self createArrangeMicAttribute:attachment];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@@ -149,6 +151,30 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark - 排麦
|
||||
- (NSAttributedString *)createArrangeMicAttribute:(AttachmentModel *)attachment {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"管理员" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
if (attachment.second == Custom_Message_Sub_Arrange_Mic_Mode_Open) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"开启了" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"排麦模式" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Arrange_Mic_Mode_Close) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"关闭了" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"排麦模式" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Arrange_Mic_Free_Mic_Open) {
|
||||
NSDictionary * dic = attachment.data;
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"设置" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d麦", ((NSNumber *)dic[@"micPos"]).intValue + 1 ] color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"为自由麦" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Arrange_Mic_Free_Mic_Close) {
|
||||
NSDictionary * dic = attachment.data;
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"关闭了" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d麦", ((NSNumber *)dic[@"micPos"]).intValue + 1 ] color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"自由麦" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
return attribute;
|
||||
}
|
||||
|
||||
#pragma mark - 糖果树公屏消息
|
||||
- (NSAttributedString *)createCandyTreeHighLevelAttribute:(AttachmentModel *)attachment {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
|
Reference in New Issue
Block a user