From d6f67b40302cf4c864602d84a2186986042bae42 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Sat, 7 Jan 2023 15:40:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E5=86=85=E7=A7=81=E8=81=8A?= =?UTF-8?q?=E6=94=BE=E5=87=BA=E8=AE=A2=E9=98=85=E6=8F=90=E9=86=92=20?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=80=9A=E7=9F=A5=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Message/View/SessionList/SessionListViewController.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m b/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m index a4e41565..4c258c43 100644 --- a/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m +++ b/xplan-ios/Main/Message/View/SessionList/SessionListViewController.m @@ -91,6 +91,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; self = [self init]; if (self) { _openType = type; + [self initDatas]; } return self; } @@ -182,7 +183,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; NSMutableArray * uids = [[NSMutableArray alloc] init]; NSMutableArray *officalArray = [NSMutableArray array]; [self.recentSessions enumerateObjectsUsingBlock:^(NIMRecentSession * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - if ([[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:obj.session.sessionId]) { + if (self.openType != SessionListOpenTypeRoom && [[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:obj.session.sessionId]) { [officalArray addObject:obj]; [self.headView updateBadgeWithSessionId:obj.session.sessionId unreadCount:obj.unreadCount]; } else { @@ -271,7 +272,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; - (void)didAddRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount { - if([[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:recentSession.session.sessionId]) { + if(self.openType != SessionListOpenTypeRoom && [[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:recentSession.session.sessionId]) { [self.headView updateBadgeWithSessionId:recentSession.session.sessionId unreadCount:recentSession.unreadCount]; return; } @@ -293,7 +294,7 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey"; - (void)didUpdateRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount { - if([[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:recentSession.session.sessionId]) { + if(self.openType != SessionListOpenTypeRoom && [[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:recentSession.session.sessionId]) { [self.headView updateBadgeWithSessionId:recentSession.session.sessionId unreadCount:recentSession.unreadCount]; return; }