麦上魅力值UI调整,增加防被踢标记
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
#import "XPRoomHalfWebView.h"
|
||||
#import "XPAnchorAudienceUpMicView.h"
|
||||
#import "XPRoomAnchorInfoCardView.h"
|
||||
#import "AnchorGiftValueView.h"
|
||||
#import "XPRoomTopicViewController.h"
|
||||
#import "XPRoomTopicAlertView.h"
|
||||
#import "XPAcrossRoomPKInviteView.h"
|
||||
@@ -78,8 +77,6 @@
|
||||
@property (nonatomic,strong) UIButton *datingProgresButton;
|
||||
///关注个播房主倒计时
|
||||
@property (nonatomic, strong) dispatch_source_t followAnchorTimer;
|
||||
///个播房房主魅力值
|
||||
@property (nonatomic, strong) AnchorGiftValueView *anchorGiftValueView;
|
||||
///个播粉丝团入口
|
||||
@property (nonatomic, strong) XPAnchorFansTeamEntranceView *fansTeamEntranceView;
|
||||
///个播小时榜入口按钮
|
||||
@@ -150,7 +147,6 @@
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.contributeEnterView];
|
||||
[self addSubview:self.anchorHourRankButton];
|
||||
[self addSubview:self.anchorGiftValueView];
|
||||
[self addSubview:self.topicStackView];
|
||||
[self addSubview:self.fansTeamEntranceView];
|
||||
[self.topicStackView addArrangedSubview:self.topicLabel];
|
||||
@@ -170,11 +166,6 @@
|
||||
make.width.mas_equalTo(67);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
[self.anchorGiftValueView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contributeEnterView.mas_right).mas_offset(8);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.height.mas_equalTo(26);
|
||||
}];
|
||||
[self.fansTeamEntranceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contributeEnterView.mas_bottom).mas_offset(5);
|
||||
make.left.mas_equalTo(0);
|
||||
@@ -300,11 +291,9 @@
|
||||
if (roomInfo.type == RoomType_Anchor) {
|
||||
self.contributeEnterView.title = @"主播榜";
|
||||
self.contributeEnterView.array = @[];
|
||||
self.anchorGiftValueView.hidden = !roomInfo.showGiftValue;
|
||||
self.fansTeamEntranceView.hidden = NO;
|
||||
self.anchorHourRankButton.hidden = NO;
|
||||
if (!roomInfo.showGiftValue) {
|
||||
self.anchorGiftValueView.giftValue = 0;
|
||||
}
|
||||
if (roomInfo.hadChangeRoomType) {
|
||||
///进房初始化当前用户与房间粉丝团关系
|
||||
@@ -316,7 +305,6 @@
|
||||
} else {
|
||||
self.contributeEnterView.title = @"房间榜";
|
||||
self.contributeEnterView.array = @[];
|
||||
self.anchorGiftValueView.hidden = YES;
|
||||
self.fansTeamEntranceView.hidden = YES;
|
||||
self.anchorHourRankButton.hidden = YES;
|
||||
}
|
||||
@@ -382,14 +370,9 @@
|
||||
if (roomInfo.type == RoomType_Anchor) {
|
||||
self.contributeEnterView.title = @"主播榜";
|
||||
self.contributeEnterView.array = @[];
|
||||
self.anchorGiftValueView.hidden = !roomInfo.showGiftValue;
|
||||
if (!roomInfo.showGiftValue) {
|
||||
self.anchorGiftValueView.giftValue = 0;
|
||||
}
|
||||
} else {
|
||||
self.contributeEnterView.title = @"房间榜";
|
||||
self.contributeEnterView.array = @[];
|
||||
self.anchorGiftValueView.hidden = YES;
|
||||
}
|
||||
|
||||
[self updateRoomTopic];
|
||||
@@ -397,23 +380,12 @@
|
||||
[self configLittleGameState];
|
||||
}
|
||||
|
||||
- (void)onMicroGiftValueUpdate:(NSDictionary *)data {
|
||||
[self handleAnchorGiftValue:data];
|
||||
}
|
||||
|
||||
|
||||
- (void)handleNIMCustomMessage:(NIMMessage *)message {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_AnchorRoom_AudienceUpMic) {
|
||||
[self showAskForUpMic:attachment.data];
|
||||
} else if(attachment.first == CustomMessageType_Room_GiftValue && attachment.second == Custom_Message_Sub_Room_GiftValue_Sync) {
|
||||
[self handleAnchorGiftValue:attachment.data];
|
||||
} else if(attachment.first == CustomMessageType_Gift && (attachment.second == Custom_Message_Sub_Gift_Send || attachment.second == Custom_Message_Sub_Gift_LuckySend || attachment.second == Custom_Message_Sub_Gift_ChannelNotify)) {
|
||||
[self handleAnchorGiftValue:attachment.data];
|
||||
}else if(attachment.first == CustomMessageType_AllMicroSend && (attachment.second == Custom_Message_Sub_AllMicroSend || attachment.second == Custom_Message_Sub_AllBatchSend || attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend)) {
|
||||
[self handleAnchorGiftValue:attachment.data];
|
||||
} else if (attachment.first == CustomMessageType_Across_Room_PK) {
|
||||
///自己是公会超管
|
||||
BOOL meIsSuperAdmin = NO;
|
||||
@@ -830,16 +802,6 @@
|
||||
sender.selected = !sender.selected;
|
||||
}
|
||||
|
||||
- (void)tapGiftValueRecognizer {
|
||||
if (self.anchorGiftValueView.hidden) return;
|
||||
if (self.delegate.getUserInfo && self.delegate.getUserInfo.uid > 0) {
|
||||
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
webView.roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];
|
||||
webView.url = [NSString stringWithFormat:@"%@?uid=%ld", URLWithType(kRoomCharmRankURL), self.delegate.getRoomInfo.uid];
|
||||
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tapFansTeamRecognizer {
|
||||
if (self.fansTeamEntranceView.hidden) {
|
||||
return;
|
||||
@@ -1017,20 +979,6 @@
|
||||
[TTPopup popupWithConfig:config];
|
||||
}
|
||||
|
||||
- (void)handleAnchorGiftValue:(NSDictionary *)dict {
|
||||
if (self.delegate.getRoomInfo.type != RoomType_Anchor) {//个播房房主位置魅力值刷新
|
||||
return;
|
||||
}
|
||||
GiftValueInfoModel * model = [GiftValueInfoModel modelWithDictionary:dict];
|
||||
for (int i = 0; i < model.giftValueVos.count; i++) {
|
||||
GiftValueDetailModel * giftValueModel = [model.giftValueVos objectAtIndex:i];
|
||||
if (![giftValueModel.uid isEqualToString:[NSString stringWithFormat:@"%zd", self.delegate.getRoomInfo.uid]]) {
|
||||
continue;
|
||||
}
|
||||
self.anchorGiftValueView.giftValue = giftValueModel.giftValue;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 个播粉丝团
|
||||
- (void)updateFansTeamEntranceView:(XPAnchorFansRelationModel *)model {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
@@ -1273,18 +1221,6 @@
|
||||
return _datingProgresButton;
|
||||
}
|
||||
|
||||
- (AnchorGiftValueView *)anchorGiftValueView {
|
||||
if (!_anchorGiftValueView) {
|
||||
_anchorGiftValueView = [[AnchorGiftValueView alloc] init];
|
||||
_anchorGiftValueView.hidden = YES;
|
||||
_anchorGiftValueView.layer.cornerRadius = 13;
|
||||
_anchorGiftValueView.layer.masksToBounds = YES;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGiftValueRecognizer)];
|
||||
[_anchorGiftValueView addGestureRecognizer:tap];
|
||||
}
|
||||
return _anchorGiftValueView;
|
||||
}
|
||||
|
||||
- (XPAnchorFansTeamEntranceView *)fansTeamEntranceView {
|
||||
if (!_fansTeamEntranceView) {
|
||||
_fansTeamEntranceView = [[XPAnchorFansTeamEntranceView alloc]init];
|
||||
|
Reference in New Issue
Block a user