From 567f371a0767b1791b330d77194a168fd9a30771 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Wed, 4 Jan 2023 15:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=9B=A0=E4=B8=BAuid=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mine/View/XPMineFootPrintViewController.m | 10 ++++--- xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m | 4 ++- .../View/SubViews/XPAnchorPkPanelView.m | 1 + .../XPRoomFunctionContainerView.m | 26 ++++++++++--------- .../MoreView/Presenter/XPMoreMenuPresenter.m | 3 +++ 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/xplan-ios/Main/Mine/View/XPMineFootPrintViewController.m b/xplan-ios/Main/Mine/View/XPMineFootPrintViewController.m index dfbfe742..c98a259b 100644 --- a/xplan-ios/Main/Mine/View/XPMineFootPrintViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineFootPrintViewController.m @@ -192,10 +192,12 @@ } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - XPMineFootPrintModel *model = [self.datasource safeObjectAtIndex1:indexPath.row]; - if (model.roomUid.integerValue > 0) { - [XPRoomViewController openRoom:model.roomUid viewController:self]; - } + 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 diff --git a/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m b/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m index 036253ef..8e5cb122 100644 --- a/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m +++ b/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m @@ -220,7 +220,9 @@ NSString *uid = userInfo.userId; if (userInfo.volume > 2){ if (uid.integerValue == 0) { - [uids addObject:[[AccountInfoStorage instance] getUid]]; + if ([AccountInfoStorage instance].getUid.length > 0){ + [uids addObject:[[AccountInfoStorage instance] getUid]]; + } }else { [uids addObject:uid]; } diff --git a/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPkPanelView.m b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPkPanelView.m index 2480ca35..1e90c70d 100644 --- a/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPkPanelView.m +++ b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPkPanelView.m @@ -100,6 +100,7 @@ - (void)dealloc { NSLog(@"销毁了"); + [self resetAcrossPKViewData]; } - (instancetype)initWithFrame:(CGRect)frame { diff --git a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m index 8c107f29..e3237302 100644 --- a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -1270,19 +1270,21 @@ self.topicStackView.hidden = ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion || self.delegate.getRoomInfo.type == RoomType_MiniGame) == YES; } [self updateRoomTopicViewConstraint]; - NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; - request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId]; - request.userIds = @[[AccountInfoStorage instance].getUid]; - [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { - if (error== nil) { - NIMChatroomMember* member = members.firstObject; - if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) { - self.editButton.hidden = NO; - } else { - self.editButton.hidden = YES; + 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]; + [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { + if (error== nil) { + NIMChatroomMember* member = members.firstObject; + if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) { + self.editButton.hidden = NO; + } else { + self.editButton.hidden = YES; + } } - } - }]; + }]; + } self.topicLabel.text = self.delegate.getRoomInfo.roomDesc.length > 0 ? self.delegate.getRoomInfo.roomDesc : @"暂未设置话题"; } diff --git a/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m b/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m index 01324655..e67920ca 100644 --- a/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m +++ b/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m @@ -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;