diff --git a/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m b/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m index 80c6debf..d50d443f 100644 --- a/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m @@ -92,6 +92,9 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; [self.view addSubview:self.titleView]; [self.view addSubview:self.contentView]; [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(openRoomNotification:) name:kOpenRoomNotification object:nil]; + if([[AccountInfoStorage instance] getUid].length == 0){ + return; + } if([ClientConfig shareConfig].roomId != nil){ [self opRoom:[ClientConfig shareConfig].roomId]; [ClientConfig shareConfig].roomId = nil; @@ -104,6 +107,9 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; } } -(void)openRoomNotification:(NSNotification *)notification{ + if([[AccountInfoStorage instance] getUid].length == 0){ + return; + } NSString *uid = notification.userInfo[@"uid"]; NSString *type = notification.userInfo[@"type"]; if([type isEqualToString:@"kOpenChat"]){