修复了用户不再坑位上用户卡片送礼物无法送出的问题
This commit is contained in:
@@ -222,8 +222,8 @@
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:12];
|
||||
_nickLabel.textColor = [ThemeColor mainTextColor];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:15];
|
||||
_nickLabel.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
@@ -415,53 +415,71 @@
|
||||
|
||||
- (NSArray<XPGiftUserInfoModel *> *)configGiftUsers:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
NSMutableArray * array = [NSMutableArray array];
|
||||
BOOL receiveIsOnMic = NO;
|
||||
for (MicroQueueModel * microModel in queue.allValues) {
|
||||
if (microModel.userInfo && microModel.userInfo.uid >0) {
|
||||
UserInfoModel * userInfo = microModel.userInfo;
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = userInfo.avatar;
|
||||
userModel.vipMic = userInfo.vipMic;
|
||||
userModel.position = [NSString stringWithFormat:@"%d", microModel.microState.position];
|
||||
userModel.uid = userInfo.uid;
|
||||
if (userInfo.uid == self.cardInfo.uid.integerValue) {
|
||||
userModel.isSelect = YES;
|
||||
receiveIsOnMic = YES;
|
||||
}
|
||||
if (self.cardInfo.roomInfo.type == RoomType_Anchor && microModel.microState.position == -1) {///个播房一直为离开模式,不需要添加房主位
|
||||
continue;
|
||||
}
|
||||
[array addObject:userModel];
|
||||
}
|
||||
}
|
||||
|
||||
RoomInfoModel * roomInfo = self.cardInfo.roomInfo;
|
||||
if (roomInfo.leaveMode) {
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = roomInfo.avatar;
|
||||
userModel.position = @"-1";
|
||||
userModel.uid = self.cardInfo.uid.integerValue;
|
||||
if (roomInfo.uid == self.cardInfo.uid.integerValue) {
|
||||
userModel.isSelect = YES;
|
||||
if (receiveIsOnMic) {
|
||||
for (MicroQueueModel * microModel in queue.allValues) {
|
||||
if (microModel.userInfo && microModel.userInfo.uid >0) {
|
||||
UserInfoModel * userInfo = microModel.userInfo;
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = userInfo.avatar;
|
||||
userModel.vipMic = userInfo.vipMic;
|
||||
userModel.position = [NSString stringWithFormat:@"%d", microModel.microState.position];
|
||||
userModel.uid = userInfo.uid;
|
||||
if (userInfo.uid == self.cardInfo.uid.integerValue) {
|
||||
userModel.isSelect = YES;
|
||||
}
|
||||
if (self.cardInfo.roomInfo.type == RoomType_Anchor && microModel.microState.position == -1) {///个播房一直为离开模式,不需要添加房主位
|
||||
continue;
|
||||
}
|
||||
[array addObject:userModel];
|
||||
}
|
||||
}
|
||||
|
||||
RoomInfoModel * roomInfo = self.cardInfo.roomInfo;
|
||||
if (roomInfo.leaveMode) {
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = roomInfo.avatar;
|
||||
userModel.position = @"-1";
|
||||
userModel.uid = self.cardInfo.uid.integerValue;
|
||||
if (roomInfo.uid == self.cardInfo.uid.integerValue) {
|
||||
userModel.isSelect = YES;
|
||||
}
|
||||
[array addObject:userModel];
|
||||
} else if (roomInfo.type == RoomType_Anchor) {
|
||||
BOOL hadContainerOwner = NO;
|
||||
for (UserInfoModel *userModel in array) {
|
||||
if (userModel.uid == roomInfo.uid) {
|
||||
hadContainerOwner = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hadContainerOwner) {
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = roomInfo.avatar;
|
||||
userModel.position = @"-1";
|
||||
userModel.uid = self.cardInfo.uid.integerValue;
|
||||
if (roomInfo.uid == self.cardInfo.uid.integerValue) {
|
||||
userModel.isSelect = YES;
|
||||
}
|
||||
[array addObject:userModel];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = self.targetUserInfo.avatar;
|
||||
userModel.nick = self.targetUserInfo.nick;
|
||||
userModel.uid = self.cardInfo.uid.integerValue;
|
||||
userModel.isSelect = YES;
|
||||
[array addObject:userModel];
|
||||
} else if (roomInfo.type == RoomType_Anchor) {
|
||||
BOOL hadContainerOwner = NO;
|
||||
for (UserInfoModel *userModel in array) {
|
||||
if (userModel.uid == roomInfo.uid) {
|
||||
hadContainerOwner = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hadContainerOwner) {
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
userModel.avatar = roomInfo.avatar;
|
||||
userModel.position = @"-1";
|
||||
userModel.uid = self.cardInfo.uid.integerValue;
|
||||
if (roomInfo.uid == self.cardInfo.uid.integerValue) {
|
||||
userModel.isSelect = YES;
|
||||
}
|
||||
[array addObject:userModel];
|
||||
}
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user