PK预约倒计时不显示bug修复

This commit is contained in:
chenguilong
2022-11-15 16:40:57 +08:00
parent 7ada3daec6
commit 5975c25682

View File

@@ -585,7 +585,7 @@
} roomUid:roomUid]; } roomUid:roomUid];
} }
if (roomInfo.showPkBeginTime && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode) {//PK if (roomInfo.showPkBeginTime && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode) {//PK
[self handleAcrollPKCountView]; [self handleAcrollPKCountView:roomInfo.pkBeginTime];
} }
[self updateRoomTopic]; [self updateRoomTopic];
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum]; [self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
@@ -1644,35 +1644,21 @@
if ([self.delegate getRoomInfo].roomModeType == RoomModeType_Open_AcrossRoomPK_mode) { if ([self.delegate getRoomInfo].roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
return; return;
} }
[self handleAcrollPKCountView]; [self handleAcrollPKCountView:time];
} }
- (void)handleAcrollPKCountView { - (void)handleAcrollPKCountView:(long long)time {
RoomInfoModel * roomInfo = self.delegate.getRoomInfo; RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
if (roomInfo.hasOpenWishGift) { if (!self.acrossPKCountView.superview) {
if (!self.acrossPKCountView.superview) { [self addSubview:self.acrossPKCountView];
[self addSubview:self.acrossPKCountView]; [self bringSubviewToFront:self.acrossPKCountView];
[self bringSubviewToFront:self.acrossPKCountView]; self.acrossPKCountView.startTime = time ? time : roomInfo.pkBeginTime;
self.acrossPKCountView.startTime = roomInfo.pkBeginTime; self.acrossPKCountView.backImageView.image = [UIImage imageNamed:@"acrossPK_countDown_left_bg"];
self.acrossPKCountView.backImageView.image = [UIImage imageNamed:@"acrossPK_countDown_left_bg"]; [self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(kNavigationHeight+4+24+4);
make.top.mas_equalTo(kNavigationHeight+4+24+4); make.left.mas_equalTo(0);
make.left.mas_equalTo(0); make.width.height.mas_equalTo(52);
make.width.height.mas_equalTo(52); }];
}];
}
} else {
if (!self.acrossPKCountView.superview) {
[self addSubview:self.acrossPKCountView];
[self bringSubviewToFront:self.acrossPKCountView];
self.acrossPKCountView.startTime = roomInfo.pkBeginTime;
self.acrossPKCountView.backImageView.image = [UIImage imageNamed:@"acrossPK_countDown_bg"];
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kNavigationHeight+4+24+4);
make.left.mas_equalTo(KScreenWidth-52);
make.width.height.mas_equalTo(52);
}];
}
} }
} }