完成
This commit is contained in:
@@ -366,10 +366,12 @@
|
||||
-(void)closeAction{
|
||||
MJWeakSelf
|
||||
UIAlertController *al = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:(UIAlertControllerStyleActionSheet)];
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"最小化房间" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[weakSelf miniRoom];
|
||||
[[QXGlobal shareGlobal] miniRoomWithRoomId:weakSelf.roomId roomCover:weakSelf.roomModel.room_info.room_cover];
|
||||
}]];
|
||||
if (![self.roomModel.room_info.type_id isEqualToString:@"6"]) {
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"最小化房间" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[weakSelf miniRoom];
|
||||
[[QXGlobal shareGlobal] miniRoomWithRoomId:weakSelf.roomId roomCover:weakSelf.roomModel.room_info.room_cover];
|
||||
}]];
|
||||
}
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"退出房间" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[weakSelf leaveRoom];
|
||||
}]];
|
||||
@@ -384,9 +386,25 @@
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
-(void)leaveRoom{
|
||||
[[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId];
|
||||
// self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
if ([self.roomModel.room_info.type_id isEqualToString:@"6"] && [self.roomModel.room_info.label_id isEqualToString:@"5"]) {
|
||||
[[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId];
|
||||
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
|
||||
for (int i = 0; i < viewControllers.count; i++) {
|
||||
UIViewController *vc = [viewControllers objectAtIndex:i];
|
||||
if ([vc isEqual:self.viewController]) {
|
||||
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
|
||||
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
|
||||
[viewControllers insertObject:roomVc atIndex:i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.navigationController.viewControllers = viewControllers;
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
QXGlobal.shareGlobal.superRoomId = @"";
|
||||
}else{
|
||||
[[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user