修复了一些可能因为uid没有导致的崩溃

This commit is contained in:
fengshuo
2023-01-04 15:11:28 +08:00
parent 81d7066ecb
commit 567f371a07
5 changed files with 27 additions and 17 deletions

View File

@@ -192,11 +192,13 @@
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
XPMineFootPrintModel *model = [self.datasource safeObjectAtIndex1:indexPath.row];
if (model.roomUid.integerValue > 0) {
[XPRoomViewController openRoom:model.roomUid viewController:self];
}
}
}
#pragma mark - XPFootPrintNavViewDelegate
///

View File

@@ -220,7 +220,9 @@
NSString *uid = userInfo.userId;
if (userInfo.volume > 2){
if (uid.integerValue == 0) {
if ([AccountInfoStorage instance].getUid.length > 0){
[uids addObject:[[AccountInfoStorage instance] getUid]];
}
}else {
[uids addObject:uid];
}

View File

@@ -100,6 +100,7 @@
- (void)dealloc {
NSLog(@"销毁了");
[self resetAcrossPKViewData];
}
- (instancetype)initWithFrame:(CGRect)frame {

View File

@@ -1270,6 +1270,7 @@
self.topicStackView.hidden = ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion || self.delegate.getRoomInfo.type == RoomType_MiniGame) == YES;
}
[self updateRoomTopicViewConstraint];
if ([AccountInfoStorage instance].getUid.length > 0) {
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
request.userIds = @[[AccountInfoStorage instance].getUid];
@@ -1283,6 +1284,7 @@
}
}
}];
}
self.topicLabel.text = self.delegate.getRoomInfo.roomDesc.length > 0 ? self.delegate.getRoomInfo.roomDesc : @"暂未设置话题";
}

View File

@@ -131,6 +131,9 @@
voice.isSelected = [RtcManager instance].isRemoteMuted;
NSString * uid = [AccountInfoStorage instance].getUid;
if (uid.length <= 0) {
return;
}
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = roomId;