修复了房间返回按钮可能导致崩溃的问题

This commit is contained in:
fengshuo
2022-12-30 18:13:11 +08:00
parent 7f50ca12f9
commit bf0e4e651f
3 changed files with 34 additions and 18 deletions

View File

@@ -1492,7 +1492,10 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[[XPRoomMiniManager shareManager] configRoomInfo:self.roomInfo];
[[XPRoomMiniManager shareManager] configUserInfo:self.userInfo];
[[XPRoomMiniManager shareManager] configCurrentMusic:self.functionView.getCurrentMusic isPlaying:self.functionView.isPlaying];
NSDictionary * dic = @{@"roomInfo":self.roomInfo.model2dictionary, @"userInfo":self.userInfo.model2dictionary, @"microQueue":self.getMicroQueue};
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic safeSetObject:self.roomInfo.model2dictionary forKey:@"roomInfo"];
[dic safeSetObject:self.userInfo.model2dictionary forKey:@"userInfo"];
[dic safeSetObject:self.getMicroQueue forKey:@"microQueue"];
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomMiniNotificationKey object:nil userInfo:dic];
[self.view endEditing:YES];
[self.littleGameView handleSelfInExitEvent];
@@ -1506,7 +1509,10 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[[XPRoomMiniManager shareManager] configRoomInfo:self.roomInfo];
[[XPRoomMiniManager shareManager] configUserInfo:self.userInfo];
[[XPRoomMiniManager shareManager] configCurrentMusic:self.functionView.getCurrentMusic isPlaying:self.functionView.isPlaying];
NSDictionary * dic = @{@"roomInfo":self.roomInfo.model2dictionary, @"userInfo":self.userInfo.model2dictionary, @"microQueue":self.getMicroQueue};
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic safeSetObject:self.roomInfo.model2dictionary forKey:@"roomInfo"];
[dic safeSetObject:self.userInfo.model2dictionary forKey:@"userInfo"];
[dic safeSetObject:self.getMicroQueue forKey:@"microQueue"];
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomMiniNotificationKey object:nil userInfo:dic];
[self.view endEditing:YES];
[self.littleGameView handleSelfInExitEvent];
@@ -1518,7 +1524,10 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[[XPRoomMiniManager shareManager] configRoomInfo:self.roomInfo];
[[XPRoomMiniManager shareManager] configUserInfo:self.userInfo];
[[XPRoomMiniManager shareManager] configCurrentMusic:self.functionView.getCurrentMusic isPlaying:self.functionView.isPlaying];
NSDictionary * dic = @{@"roomInfo":self.roomInfo.model2dictionary, @"userInfo":self.userInfo.model2dictionary, @"microQueue":self.getMicroQueue};
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic safeSetObject:self.roomInfo.model2dictionary forKey:@"roomInfo"];
[dic safeSetObject:self.userInfo.model2dictionary forKey:@"userInfo"];
[dic safeSetObject:self.getMicroQueue forKey:@"microQueue"];
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomMiniNotificationKey object:nil userInfo:dic];
[self.view endEditing:YES];
[self handleFirstOutRoom];