更多菜单栏增加清除房间公屏

This commit is contained in:
chenguilong
2022-04-25 17:45:57 +08:00
parent 514081b699
commit eb373ad8aa
12 changed files with 154 additions and 14 deletions

View File

@@ -315,7 +315,28 @@
[attribute appendAttributedString:[self createImageAttribute:[UIImage imageNamed:@"room_menu_more"]]];
[attribute appendAttributedString:[self createTextAttribute:@"图标即可开启" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
return attribute;
}
} else if (attachment.second == Custom_Message_Sub_Update_RoomInfo_CleanScreen) {
NSNumber *roleType = attachment.data[@"roleType"];
NSString *nick = attachment.data[@"nick"];
NSInteger uid = 0;
if ([attachment.data[@"uid"] isKindOfClass:[NSNumber class]]) {
uid = ((NSNumber *)attachment.data[@"uid"]).integerValue;
} else if ([attachment.data[@"uid"] isKindOfClass:[NSString class]]) {
uid = ((NSString *)attachment.data[@"uid"]).integerValue;
}
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
[attribute appendAttributedString:[self createTextAttribute:@"消息:" color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
if (roleType.integerValue == 1) {
[attribute appendAttributedString:[self createTextAttribute:@"房主" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
} else if (roleType.integerValue == 2) {
[attribute appendAttributedString:[self createTextAttribute:@"管理员" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
}
[attribute appendAttributedString:[self createTextAttribute:@"已清空房间公屏消息" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
[self attributeAddHihtLight:attribute uid:uid];
return attribute;
}
return nil;
}