个播房主位声波动画,请求上麦的弹窗优化
This commit is contained in:
@@ -147,16 +147,8 @@
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_AnchorRoom_AudienceUpMic) {
|
||||
UserInfoModel *model = [UserInfoModel modelWithJSON:attachment.data];
|
||||
XPAnchorAudienceUpMicView *upMicView = [[XPAnchorAudienceUpMicView alloc] initWithFrame:CGRectMake(0, 0, 300, 226) delegate:self.delegate];
|
||||
upMicView.info = model;
|
||||
TTPopupConfig *config = [[TTPopupConfig alloc] init];
|
||||
config.filterIdentifier = @"audienceRequestUpMic";
|
||||
config.shouldFilterPopup = YES;
|
||||
config.contentView = upMicView;
|
||||
config.style = TTPopupStyleAlert;
|
||||
[TTPopup popupWithConfig:config];
|
||||
if (attachment.first == CustomMessageType_AnchorRoom_AudienceUpMic) {
|
||||
[self showAskForUpMic:attachment.data];
|
||||
} else if(attachment.first == CustomMessageType_Room_GiftValue && attachment.second == Custom_Message_Sub_Room_GiftValue_Sync) {
|
||||
[self handleAnchorGiftValue:attachment.data];
|
||||
} else if(attachment.first == CustomMessageType_Gift && (attachment.second == Custom_Message_Sub_Gift_Send || attachment.second == Custom_Message_Sub_Gift_LuckySend || attachment.second == Custom_Message_Sub_Gift_ChannelNotify)) {
|
||||
@@ -262,6 +254,23 @@
|
||||
} uid:roomUid];
|
||||
}
|
||||
|
||||
///个播房用户请求上麦弹窗
|
||||
- (void)showAskForUpMic:(NSDictionary *)dict {
|
||||
NSString *roomUid = [NSString stringWithFormat:@"%zd", self.delegate.getRoomInfo.uid];
|
||||
if (![roomUid isEqualToString:[AccountInfoStorage instance].getUid]) {
|
||||
return;
|
||||
}
|
||||
UserInfoModel *model = [UserInfoModel modelWithJSON:dict];
|
||||
XPAnchorAudienceUpMicView *upMicView = [[XPAnchorAudienceUpMicView alloc] initWithFrame:CGRectMake(0, 0, 300, 226) delegate:self.delegate];
|
||||
upMicView.info = model;
|
||||
TTPopupConfig *config = [[TTPopupConfig alloc] init];
|
||||
config.filterIdentifier = @"audienceRequestUpMic";
|
||||
config.shouldFilterPopup = YES;
|
||||
config.contentView = upMicView;
|
||||
config.style = TTPopupStyleAlert;
|
||||
[TTPopup popupWithConfig:config];
|
||||
}
|
||||
|
||||
- (void)handleAnchorGiftValue:(NSDictionary *)dict {
|
||||
if (self.delegate.getRoomInfo.type != RoomType_Anchor) {//个播房房主位置魅力值刷新
|
||||
return;
|
||||
|
Reference in New Issue
Block a user