Skip to content

Commit 7de39ba

Browse files
guangyaoguangyao
authored andcommitted
Fix 过滤沟通过添加好友通知
1 parent e4e8059 commit 7de39ba

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ios/RNNeteaseIm/RNNeteaseIm/NoticeViewController.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ @interface NoticeViewController ()<NIMUserManagerDelegate,NIMSystemNotificationM
1919

2020
@implementation NoticeViewController
2121

22-
- (void)dealloc{
23-
NSLog(@"NoticeViewController----dealloc");
24-
}
2522

2623
+(instancetype)initWithNoticeViewController{
2724
static NoticeViewController *notVC = nil;
@@ -64,11 +61,8 @@ -(void)initWithDelegate{
6461
[[NIMSDK sharedSDK].systemNotificationManager markNotificationsAsRead:notices];
6562
[[[NIMSDK sharedSDK] systemNotificationManager] deleteNotification:notices];
6663
}
67-
6864
}
6965
}
70-
71-
7266
}
7367

7468
[self ReFrash];
@@ -114,18 +108,17 @@ - (void)onReceiveSystemNotification:(NIMSystemNotification *)notification{
114108
if (attach.operationType == NIMUserOperationVerify) {//如果是通过添加好友请求,标为已读并删除
115109
[[NIMSDK sharedSDK].systemNotificationManager markNotificationsAsRead:notification];
116110
[[[NIMSDK sharedSDK] systemNotificationManager] deleteNotification:notification];
111+
return;
117112
}
118113
}
119114

120-
121115
if (_notifications.count) {
122116
for (NIMSystemNotification *notices in _notifications) {
123117

124118
if ([notices.sourceID isEqualToString:notification.sourceID]) {
125119

126120
[[[NIMSDK sharedSDK] systemNotificationManager] deleteNotification:notices];
127121
[_notifications removeObject:notices];
128-
129122
}
130123
}
131124
}

0 commit comments

Comments
 (0)