修复了用户不再坑位上用户卡片送礼物无法送出的问题

This commit is contained in:
fengshuo
2022-04-20 17:40:21 +08:00
parent eee3d38742
commit 8afd2cdfe7
2 changed files with 58 additions and 40 deletions

View File

@@ -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;
}

View File

@@ -415,6 +415,16 @@
- (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;
if (userInfo.uid == self.cardInfo.uid.integerValue) {
receiveIsOnMic = YES;
}
}
}
if (receiveIsOnMic) {
for (MicroQueueModel * microModel in queue.allValues) {
if (microModel.userInfo && microModel.userInfo.uid >0) {
UserInfoModel * userInfo = microModel.userInfo;
@@ -462,6 +472,14 @@
[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];
}
return array;
}