|
@@ -240,7 +240,6 @@
|
|
|
[self joinChatRoom];
|
|
|
self.view.backgroundColor = HexRGB(0xffffff);
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(leaveRoomAction) name:@"classroomLogout" object:nil];
|
|
|
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(quitRoomAction) name:@"classroomQuit" object:nil];
|
|
|
|
|
|
[self addSubviews];
|
|
|
[self bindDelegates];
|
|
@@ -267,25 +266,16 @@
|
|
|
#pragma mark ----- 账号异地登陆
|
|
|
- (void)leaveRoomAction {
|
|
|
[LOADING_MANAGER MBShowAUTOHidingInWindow:@"该账号在其他设备上登录"];
|
|
|
- self.isQuitRoom = YES;
|
|
|
- [[LoginHelper sharedInstance] logout];
|
|
|
- self.cancleAlert = YES;
|
|
|
- [TRTC_MANAGER leaveRoom:^(NSInteger code) {
|
|
|
-
|
|
|
- }];
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationName:@"backLoginView" object:nil];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-- (void)quitRoomAction {
|
|
|
+ @weakObj(self);
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ @strongObj(self);
|
|
|
self.isQuitRoom = YES;
|
|
|
[[LoginHelper sharedInstance] logout];
|
|
|
self.cancleAlert = YES;
|
|
|
[TRTC_MANAGER leaveRoom:^(NSInteger code) {
|
|
|
|
|
|
}];
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationName:@"showOtherLoginAlert" object:nil];
|
|
|
+ [self hideAlertView];
|
|
|
});
|
|
|
}
|
|
|
|