修改提交

This commit is contained in:
启星
2025-12-04 23:35:49 +08:00
parent 1c5a908dda
commit 57975eafc1
38 changed files with 216 additions and 112 deletions

View File

@@ -42,7 +42,7 @@
-(void)joinGroupWithRoomId:(NSString *)roomId{
MJWeakSelf
if (self.groupId) {
[self quitGroupWithRoomId:self.groupId];
[self quitGroupWithRoomId:self.groupId removeListener:YES];
}
[[V2TIMManager sharedInstance] addGroupListener:self];
[[V2TIMManager sharedInstance] addAdvancedMsgListener:self];
@@ -56,12 +56,13 @@
QXLOG(@"腾讯IM加入聊天室失败-code%d-原因%@",code,desc);
}];
}
-(void)quitGroupWithRoomId:(NSString *)roomId{
MJWeakSelf
self.groupId = nil;
self.roomId = nil;
[[V2TIMManager sharedInstance] removeGroupListener:self];
[[V2TIMManager sharedInstance] removeAdvancedMsgListener:self];
-(void)quitGroupWithRoomId:(NSString *)roomId removeListener:(BOOL)removeListener{
if (removeListener) {
self.groupId = nil;
self.roomId = nil;
[[V2TIMManager sharedInstance] removeGroupListener:self];
[[V2TIMManager sharedInstance] removeAdvancedMsgListener:self];
}
NSString *groupId = [NSString stringWithFormat:@"room%@",roomId];
[[V2TIMManager sharedInstance] quitGroup:groupId succ:^{