1. 修正首页我的 tab model 的判断

2. 移除房间信息更新处的热度更新时机
This commit is contained in:
eggmanQQQ
2024-06-21 17:23:33 +08:00
parent 22e54d3d6d
commit fe688ff275
2 changed files with 4 additions and 9 deletions

View File

@@ -51,8 +51,8 @@
_model = model;
if (model) {
self.avatarImageView.imageUrl = model.avatar;
self.roomNameLabel.text = model.title;
self.descLabel.text = model.roomDesc;
self.roomNameLabel.text = model.title.length > 0 ? model.title : YMLocalizedString(@"XPMinePersonalCenterCell1");
self.descLabel.text = model.roomDesc.length > 0 ? model.roomDesc : YMLocalizedString(@"XPHomeMineViewController3");
self.heatLabel.text = [NSString stringWithFormat:@"%ld", model.onlineNum];
for (UIView *subView in self.miniAvatarsContainer.subviews) {
@@ -86,7 +86,9 @@
for (UIView *subView in self.miniAvatarsContainer.subviews) {
[subView removeFromSuperview];
}
}
if (self.miniAvatarsContainer.subviews.count == 0) {
NetImageConfig *config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
NetImageView *iconView = [[NetImageView alloc]initWithConfig:config];

View File

@@ -531,7 +531,6 @@
}
- (void)onRoomUpdate {
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
self.contributeEnterView.title = roomInfo.serialValue.stringValue;
MicroQueueModel * model = [self.delegate.getMicroQueue objectForKey:@"-1"];
if (roomInfo.roomModeType == RoomModeType_Open_Blind && model.userInfo && model.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
@@ -567,7 +566,6 @@
}
[self updateHourRankEntrance];
if (roomInfo.type == RoomType_Anchor) {
// self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView7");
if (roomInfo.hadChangeRoomType) {
///
[Api requestInRoomFansTeam:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@@ -577,7 +575,6 @@
[self updateContrionEntranceWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] type:@"month"];
}
} else {
// self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView5");
[self.fansTeamEntranceView removeFromSuperview];
if (roomInfo.hadChangeRoomType) {
[self updateContrionEntranceWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] type:@"day"];
@@ -598,7 +595,6 @@
NSString * roomUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
[self updateHourRankEntrance];
if (roomInfo.type == RoomType_Anchor) {//
// self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView7");
///
[Api requestInRoomFansTeam:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
XPAnchorFansRelationModel *model = [XPAnchorFansRelationModel modelWithJSON:data.data];
@@ -606,7 +602,6 @@
} teamUid:roomUid];
[self updateContrionEntranceWithRoomUid:roomUid type:@"month"];//
} else {
// self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView7");
[self updateContrionEntranceWithRoomUid:roomUid type:@"day"];//
}
if (![[AccountInfoStorage instance].getUid isEqualToString:roomUid]) {//
@@ -1710,7 +1705,6 @@
- (void)configWishGiftEnter {
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
self.contributeEnterView.title = roomInfo.serialValue.stringValue;
NSString * roomUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
if (roomInfo.hasOpenWishGift) {
[Api wishGiftList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@@ -1745,7 +1739,6 @@
- (void)roomInfoUpdateConfigWishGift {
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
self.contributeEnterView.title = roomInfo.serialValue.stringValue;
if (roomInfo.datingState == RoomDatingStateChangeType_Close) {
if (self.wishGiftView.superview) {
self.wishGiftView.hidden = NO;