关闭房间特效的公屏提示
This commit is contained in:
@@ -177,6 +177,13 @@
|
|||||||
[attribute appendAttributedString:[self createTextAttribute:@"管理员已开启聊天公屏" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
[attribute appendAttributedString:[self createTextAttribute:@"管理员已开启聊天公屏" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||||
}
|
}
|
||||||
return attribute;
|
return attribute;
|
||||||
|
} else if(attachment.second == Custom_Message_Sub_Update_RoomInfo_AnimateEffect) {
|
||||||
|
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||||
|
[attribute appendAttributedString:[self createTextAttribute:@"消息:" color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||||
|
[attribute appendAttributedString:[self createTextAttribute:@"管理员已关闭房间内礼物特效,点击底部" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||||
|
[attribute appendAttributedString:[self createImageAttribute:[UIImage imageNamed:@"room_menu_more"]]];
|
||||||
|
[attribute appendAttributedString:[self createTextAttribute:@"图标即可开启" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||||
|
return attribute;
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#import "XPMacro.h"
|
#import "XPMacro.h"
|
||||||
#import "XPRoomMessageConstant.h"
|
#import "XPRoomMessageConstant.h"
|
||||||
#import "XPRoomMessageParser.h"
|
#import "XPRoomMessageParser.h"
|
||||||
|
#import "AccountInfoStorage.h"
|
||||||
///Model
|
///Model
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
#import "AttachMentModel.h"
|
#import "AttachMentModel.h"
|
||||||
@@ -196,6 +197,7 @@
|
|||||||
@(CustomMessageType_Update_RoomInfo):
|
@(CustomMessageType_Update_RoomInfo):
|
||||||
[NSSet setWithObjects:
|
[NSSet setWithObjects:
|
||||||
@(Custom_Message_Sub_Update_RoomInfo_MessageState),
|
@(Custom_Message_Sub_Update_RoomInfo_MessageState),
|
||||||
|
@(Custom_Message_Sub_Update_RoomInfo_AnimateEffect),
|
||||||
nil],
|
nil],
|
||||||
@(CustomMessageType_Collection_Room):
|
@(CustomMessageType_Collection_Room):
|
||||||
[NSSet setWithObjects:
|
[NSSet setWithObjects:
|
||||||
@@ -241,6 +243,12 @@
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
[self addRoomMessage:message];
|
[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];
|
[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
|
#pragma mark - ScrollViewDelegate
|
||||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
|
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
|
||||||
// 手动拖拽开始
|
// 手动拖拽开始
|
||||||
|
Reference in New Issue
Block a user