bug修复

This commit is contained in:
liyuhua
2023-10-27 19:30:45 +08:00
parent a2083617d9
commit 10e7403101
3 changed files with 20 additions and 16 deletions

View File

@@ -218,7 +218,9 @@
self.pi_contentView.attributedText = giftNameAtt;
self.giftImageView.imageUrl = _broadcastModel.giftUrl;
self.roomNameLabel.text = _broadcastModel.roomTitle;
self.countLabel.text = [NSString stringWithFormat:@"x%ld", _broadcastModel.giftNum];
if(_broadcastModel.giftNum > 1){
self.countLabel.text = [NSString stringWithFormat:@"x%ld", _broadcastModel.giftNum];
}
[self updateSubviews:_broadcastModel.levelNum];
}
}
@@ -238,6 +240,8 @@
_senderAvatarView = [[NetImageView alloc]initWithConfig:config];
_senderAvatarView.layer.cornerRadius = kGetScaleWidth(44)/2;
_senderAvatarView.layer.masksToBounds = YES;
_senderAvatarView.userInteractionEnabled = YES;
}
return _senderAvatarView;
}

View File

@@ -1618,7 +1618,20 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
}else if (attachment.first == CustomMessageType_Tarot && (attachment.second == Custom_Message_Sub_Tarot_Advanced || attachment.second == Custom_Message_Sub_Tarot_Intermediate)){
isHave = YES;
}if (attachment.first == CustomMessageType_RedPacket && attachment.second == Custom_Message_Sub_AllDiamandRedPacket) {
XPRedPacketModel *data = [XPRedPacketModel modelWithDictionary:attachment.data];
data.validityType = 0;
data.kind = 1;
data.redEnvelopeId = attachment.data[@"redEnvelopeId"];
RoomInfoModel *roomInfo = self.roomInfo;
XPReceiveRedPacketView *view = [[XPReceiveRedPacketView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
if (roomInfo.uid == data.roomUid.integerValue) {
view.inAllPacketRoom = YES;
} else {
view.inAllPacketRoom = NO;
}
view.receiveModel = data;
[self.view addSubview:view];
[self.view bringSubviewToFront:view];
}
if(isHave == NO)return;

View File

@@ -644,11 +644,10 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
data.redEnvelopeId = attachment.data[@"redEnvelopeId"];
//
__block BOOL isInRoom;
__block XPRoomViewController<RoomHostDelegate> * roomVC ;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController.viewControllers enumerateObjectsUsingBlock:^(__kindof UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[XPRoomViewController class]]) {
roomVC = obj;
*stop = YES;
isInRoom = YES;
}
@@ -660,18 +659,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
view.receiveModel = data;
[currentVc.view addSubview:view];
[currentVc.view bringSubviewToFront:view];
}else{
RoomInfoModel *roomInfo = [roomVC getRoomInfo];
XPReceiveRedPacketView *view = [[XPReceiveRedPacketView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
if (roomInfo.uid == data.roomUid.integerValue) {
view.inAllPacketRoom = YES;
} else {
view.inAllPacketRoom = NO;
}
view.receiveModel = data;
[kWindow addSubview:view];
[kWindow bringSubviewToFront:view];
}
}
///