修复bug

This commit is contained in:
liyuhua
2023-08-31 17:50:20 +08:00
parent 8c21f5117c
commit 385212a3f5
26 changed files with 280 additions and 115 deletions

View File

@@ -22,6 +22,7 @@
@property(nonatomic,strong) UILabel *gameNameView;
///
@property(nonatomic,strong) UILabel *gameNumView;
@property(nonatomic,strong) NIMMessage *msg;
@end
@implementation MessageContentGameView
@@ -89,6 +90,7 @@
}
- (void)render:(NIMMessage *)message {
self.msg = message;
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
AttachmentModel * attach = obj.attachment;
UserGameInfoVo *gameInfo = [UserGameInfoVo modelWithDictionary:attach.data];
@@ -97,11 +99,19 @@
_gameNumView.text = [NSString stringWithFormat:@"%@ 局",gameInfo.inning];
}
-(void)checkGameAction{
if(self.delegate && [self.delegate respondsToSelector:@selector(checkGameListInfo:)]){
[self.delegate checkGameListInfo:self.msg];
}
}
- (NetImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [NetImageView new];
_bgImageView.image = kImage(@"message_session_game_Invite_bg");
_bgImageView.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(checkGameAction)];
[_bgImageView addGestureRecognizer:tap];
}
return _bgImageView;
}
@@ -131,6 +141,7 @@
NetImageConfig *config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultEmptyAvatarPlaceholder];
_gameIcomView = [[NetImageView alloc]initWithConfig:config];
_gameIcomView.userInteractionEnabled = YES;
}
return _gameIcomView;
}