头条优化
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import "Api+Message.h"
|
||||
#import "MSSessionPublicChatHallTopModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
@interface MsRoomMessageMainView()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate>
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
@@ -83,6 +84,24 @@
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
- (void)handleNIMCustomMessage:(NIMMessage *)message {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
|
||||
if(attachment.first == CustomMessageType_Chat_Hall_Headlinesn && attachment.second == Custom_Message_Sub_Chat_Hall_Headlinesn){
|
||||
MSSessionPublicChatHallTopModel *topModel = [MSSessionPublicChatHallTopModel modelWithDictionary:attachment.data];
|
||||
if(topModel.recordStatus == 1){
|
||||
self.chatHallView.topModel = nil;
|
||||
self.roomView.topModel = nil;
|
||||
|
||||
}else{
|
||||
self.chatHallView.topModel = topModel;
|
||||
self.roomView.topModel = topModel;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UserInfoModel *infoModel = self.hostDelegate.getUserInfo;
|
||||
NSString *publicChatRoomId = [NSString stringWithFormat:@"%@",[ClientConfig shareConfig].configInfo.publicChatRoomIdMap[infoModel.partitionId]];
|
||||
if(![message.session.sessionId isEqualToString:publicChatRoomId]){
|
||||
@@ -95,6 +114,8 @@
|
||||
}
|
||||
|
||||
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
|
||||
|
||||
|
||||
UserInfoModel *infoModel = self.hostDelegate.getUserInfo;
|
||||
NSString *publicChatRoomId = [NSString stringWithFormat:@"%@",[ClientConfig shareConfig].configInfo.publicChatRoomIdMap[infoModel.partitionId]];
|
||||
if(![message.session.sessionId isEqualToString:publicChatRoomId]){
|
||||
|
Reference in New Issue
Block a user