最小化被踢 被拉黑的时候的操作
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "XPConstant.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "RtcManager.h"
|
||||
#import "XPRoomMiniManager.h"
|
||||
///Model
|
||||
#import "RoomInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
@@ -25,7 +27,6 @@
|
||||
#import "XPRoomMessageContainerView.h"
|
||||
#import "RoomHeaderView.h"
|
||||
#import "SocialStageView.h"
|
||||
#import "XPMiniRoomView.h"
|
||||
#import "XPRoomAnimationView.h"
|
||||
///P
|
||||
#import "XPRoomPresenter.h"
|
||||
@@ -151,10 +152,10 @@
|
||||
}
|
||||
|
||||
- (void)exitOldRoom {
|
||||
NSString * roomUid = [XPMiniRoomView shareMiniRoomView].currentRoomUid;
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", [XPRoomMiniManager shareManager].getRoomInfo.uid];
|
||||
if (roomUid.integerValue > 0 && roomUid.integerValue != self.roomUid.integerValue) {
|
||||
//有最小化房间 并且要进入的房间和最小化的房间不一样的话 就先退掉 最小化的房间
|
||||
[self.presenter exitNIMRoom:[XPMiniRoomView shareMiniRoomView].currentRoomId];
|
||||
[self.presenter exitNIMRoom:roomUid];
|
||||
[[RtcManager instance] exitRoom];
|
||||
}
|
||||
}
|
||||
@@ -169,13 +170,14 @@
|
||||
[self enterRoomFail];
|
||||
} else {
|
||||
[self.roomHeaderView onRoomUpdate];
|
||||
if ([XPMiniRoomView shareMiniRoomView].currentRoomUid.integerValue != self.roomUid.integerValue) {// 最小化进房 还是原来的房间的话 不需要重新进入云信 因为压根没退
|
||||
if ([XPRoomMiniManager shareManager].getRoomInfo.uid != self.roomUid.integerValue) {// 最小化进房 还是原来的房间的话 不需要重新进入云信 因为压根没退
|
||||
[self.presenter enterNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId] user:self.userInfo];
|
||||
} else {///虽然没退出房间 但是队列还是要拿的
|
||||
[[XPRoomMiniManager shareManager] configRoomInfo:nil];
|
||||
} else {
|
||||
//虽然没退出房间 但是队列还是要拿的
|
||||
//TODO: 进同一个房间的话 不需要加入重新加入RTC
|
||||
[self enterRoomSuccess];
|
||||
}
|
||||
///进入一个房间 就不存在最小化的了
|
||||
[[XPMiniRoomView shareMiniRoomView] hiddenRoomMiniView];
|
||||
}
|
||||
} else { // 房间无效,分是否为自己房间进行处理
|
||||
if ([self.roomUid isEqualToString:[NSString stringWithFormat:@"%ld", userInfo.uid]]) { // 当前用户进入自己房间
|
||||
@@ -280,7 +282,9 @@
|
||||
}
|
||||
|
||||
- (void)miniRoom {
|
||||
[[XPMiniRoomView shareMiniRoomView] configRoomMiniView:self.roomInfo userInfo:self.userInfo micQueue:[self getMicroQueue]];
|
||||
[[XPRoomMiniManager shareManager] configRoomInfo:self.roomInfo];
|
||||
NSDictionary * dic = @{@"roomInfo":self.roomInfo.model2dictionary, @"userInfo":self.userInfo.model2dictionary, @"microQueue":self.getMicroQueue};
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomMiniNotificationKey object:nil userInfo:dic];
|
||||
[self.view endEditing:YES];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
Reference in New Issue
Block a user