头条优化

This commit is contained in:
liyuhua
2024-06-04 11:30:58 +08:00
committed by eggmanQQQ
parent d4023a1d4c
commit 5cb44c5e72
5 changed files with 45 additions and 49 deletions

View File

@@ -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]){