This commit is contained in:
启星
2025-09-08 08:49:04 +08:00
parent ddeec09ea5
commit 349cab1499
290 changed files with 8627 additions and 760 deletions

View File

@@ -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];
}
}