关闭房间特效的公屏提示

This commit is contained in:
fengshuo
2021-12-27 17:10:36 +08:00
parent 0645ed6b56
commit 0e5e700cbe
2 changed files with 26 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#import "XPMacro.h"
#import "XPRoomMessageConstant.h"
#import "XPRoomMessageParser.h"
#import "AccountInfoStorage.h"
///Model
#import "RoomInfoModel.h"
#import "AttachMentModel.h"
@@ -196,6 +197,7 @@
@(CustomMessageType_Update_RoomInfo):
[NSSet setWithObjects:
@(Custom_Message_Sub_Update_RoomInfo_MessageState),
@(Custom_Message_Sub_Update_RoomInfo_AnimateEffect),
nil],
@(CustomMessageType_Collection_Room):
[NSSet setWithObjects:
@@ -241,6 +243,12 @@
return;
} else {
[self addRoomMessage:message];
NIMChatroomNotificationMember *member = content.targets[0];
if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
if (!self.hostDelegate.getRoomInfo.hasAnimationEffect) {
[self roomInfoNoGiftAnimationMessage:message];
}
}
}
}
}
@@ -252,6 +260,17 @@
[self addRoomMessage:message];
}
- (void)roomInfoNoGiftAnimationMessage:(NIMMessage *)message {
AttachmentModel *attachement = [[AttachmentModel alloc]init];
attachement.first = CustomMessageType_Update_RoomInfo;
attachement.second = Custom_Message_Sub_Update_RoomInfo_AnimateEffect;
NIMMessage *tempMessage = [[NIMMessage alloc]init];
NIMCustomObject *customObject = [[NIMCustomObject alloc]init];
customObject.attachment = attachement;
tempMessage.messageObject = customObject;
[self addRoomMessage:tempMessage];
}
#pragma mark - ScrollViewDelegate
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
//