修复bug

This commit is contained in:
liyuhua
2023-08-29 17:54:23 +08:00
parent a1ff09f33f
commit 09cbeb72a6
26 changed files with 202 additions and 39 deletions

View File

@@ -65,6 +65,8 @@
@property (nonatomic,strong) NIMMessage *lastMessage;
///
@property (nonatomic,strong) SessionRiskView *riskAlertView;
///
@property(nonatomic,strong) UIView *emptyVeiw;
///
@property(nonatomic,strong) UICollectionView *collectionView;
@@ -116,6 +118,14 @@
}
-(void)getAttentionUserNotification{
[self.presenter getChatLimitReceiverUid:self.session.sessionId];
if ([self showChatRiskView:self.userInfo]) {
self.riskAlertView.warning = self.userInfo.banAccount ? @" 温馨提醒:当前对方账号存在异常,请谨慎来往!" : @"温馨提示:对方和您非好友关系,请注意隐私安全!";
self.riskAlertView.hidden = NO;
self.emptyVeiw.hidden = YES;
}else{
self.riskAlertView.hidden = YES;
self.emptyVeiw.hidden = NO;
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
@@ -172,6 +182,7 @@
self.sessionNavView.isInRoom = self.openType == SessionListOpenTypeRoom;
[self.view addSubview:self.sessionNavView];
[self.view addSubview:self.stackView];
[self.stackView addArrangedSubview:self.emptyVeiw];
[self.stackView addArrangedSubview:self.riskAlertView];
[self.view addSubview:self.sessionTableView];
[self.view addSubview:self.toolbarView];
@@ -308,6 +319,7 @@
[gameTextArray addObject:gameModel.gameName];
self.collectionView.hidden = NO;
[self.collectionView reloadData];
[self.sessionTableView nim_scrollToBottom:YES];
return;
}
if(gameTextArray.count > 0){
@@ -316,6 +328,7 @@
self.pageControl.pageList = gameTextArray;
self.pageControl.curPage = 0;
[self.collectionView reloadData];
[self.sessionTableView nim_scrollToBottom:YES];
}
}
@@ -557,13 +570,12 @@
AttachmentModel * attachment = obj.attachment;
if(attachment.first == CustomMessageType_Initiat_Invitation && attachment.second == Custom_Message_Sub_Initiat_Invitation_Initiating_User){
UserGameInfoVo *gameInfo = [UserGameInfoVo modelWithDictionary:attachment.data];
if([gameInfo.toUid isEqualToString:[AccountInfoStorage instance].getUid]){
return;
}
XPMineGameOrderDetailsView *orderView = [[XPMineGameOrderDetailsView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
XPMineGameOrderDetailsView *orderView = [[XPMineGameOrderDetailsView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) type:[gameInfo.toUid isEqualToString:[AccountInfoStorage instance].getUid] ? 1 : 0];
orderView.gameInfo = gameInfo;
orderView.isFormChat = YES;
orderView.delegate = self;
[self.view addSubview:orderView];
}
@@ -835,6 +847,7 @@
- (void)sessionRiskViewCloseButtonClick:(SessionRiskView *)view {
[[SessionRiskCache shareCache] saveCloseRisk:self.session.sessionId];
self.riskAlertView.hidden = YES;
self.emptyVeiw.hidden = NO;
}
@@ -926,5 +939,12 @@
}
return _stackView;
}
- (UIView *)emptyVeiw{
if(!_emptyVeiw){
_emptyVeiw = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, kGetScaleWidth(10))];
_emptyVeiw.hidden = YES;
_emptyVeiw.backgroundColor = [UIColor clearColor];
}
return _emptyVeiw;
}
@end