修复了一些可能因为uid没有导致的崩溃
This commit is contained in:
@@ -192,10 +192,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
XPMineFootPrintModel *model = [self.datasource safeObjectAtIndex1:indexPath.row];
|
if (self.datasource.count > 0) {
|
||||||
if (model.roomUid.integerValue > 0) {
|
XPMineFootPrintModel *model = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||||
[XPRoomViewController openRoom:model.roomUid viewController:self];
|
if (model.roomUid.integerValue > 0) {
|
||||||
}
|
[XPRoomViewController openRoom:model.roomUid viewController:self];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - XPFootPrintNavViewDelegate
|
#pragma mark - XPFootPrintNavViewDelegate
|
||||||
|
@@ -220,7 +220,9 @@
|
|||||||
NSString *uid = userInfo.userId;
|
NSString *uid = userInfo.userId;
|
||||||
if (userInfo.volume > 2){
|
if (userInfo.volume > 2){
|
||||||
if (uid.integerValue == 0) {
|
if (uid.integerValue == 0) {
|
||||||
[uids addObject:[[AccountInfoStorage instance] getUid]];
|
if ([AccountInfoStorage instance].getUid.length > 0){
|
||||||
|
[uids addObject:[[AccountInfoStorage instance] getUid]];
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
[uids addObject:uid];
|
[uids addObject:uid];
|
||||||
}
|
}
|
||||||
|
@@ -100,6 +100,7 @@
|
|||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
NSLog(@"销毁了");
|
NSLog(@"销毁了");
|
||||||
|
[self resetAcrossPKViewData];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame {
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
|
@@ -1270,19 +1270,21 @@
|
|||||||
self.topicStackView.hidden = ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion || self.delegate.getRoomInfo.type == RoomType_MiniGame) == YES;
|
self.topicStackView.hidden = ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion || self.delegate.getRoomInfo.type == RoomType_MiniGame) == YES;
|
||||||
}
|
}
|
||||||
[self updateRoomTopicViewConstraint];
|
[self updateRoomTopicViewConstraint];
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
if ([AccountInfoStorage instance].getUid.length > 0) {
|
||||||
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
|
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||||
request.userIds = @[[AccountInfoStorage instance].getUid];
|
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
|
||||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||||
if (error== nil) {
|
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||||
NIMChatroomMember* member = members.firstObject;
|
if (error== nil) {
|
||||||
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
NIMChatroomMember* member = members.firstObject;
|
||||||
self.editButton.hidden = NO;
|
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
||||||
} else {
|
self.editButton.hidden = NO;
|
||||||
self.editButton.hidden = YES;
|
} else {
|
||||||
|
self.editButton.hidden = YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}];
|
||||||
}];
|
}
|
||||||
self.topicLabel.text = self.delegate.getRoomInfo.roomDesc.length > 0 ? self.delegate.getRoomInfo.roomDesc : @"暂未设置话题";
|
self.topicLabel.text = self.delegate.getRoomInfo.roomDesc.length > 0 ? self.delegate.getRoomInfo.roomDesc : @"暂未设置话题";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -131,6 +131,9 @@
|
|||||||
voice.isSelected = [RtcManager instance].isRemoteMuted;
|
voice.isSelected = [RtcManager instance].isRemoteMuted;
|
||||||
|
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
if (uid.length <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||||
request.roomId = roomId;
|
request.roomId = roomId;
|
||||||
|
Reference in New Issue
Block a user