礼物面板添加个播六五
This commit is contained in:
@@ -1008,12 +1008,16 @@
|
||||
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 (self.delegate.getRoomInfo.type == RoomType_Anchor && microModel.microState.position == -1) {///个播房一直为离开模式,不需要添加房主位
|
||||
continue;
|
||||
}
|
||||
[array addObject:userModel];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (self.delegate.getRoomInfo.leaveMode) {
|
||||
RoomInfoModel * roomInfo= self.delegate.getRoomInfo;
|
||||
XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init];
|
||||
@@ -1021,6 +1025,22 @@
|
||||
userModel.position = @"-1";
|
||||
userModel.uid = roomInfo.uid;
|
||||
[array addObject:userModel];
|
||||
} else if (self.delegate.getRoomInfo.type == RoomType_Anchor) {
|
||||
RoomInfoModel * roomInfo= self.delegate.getRoomInfo;
|
||||
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 = roomInfo.uid;
|
||||
[array addObject:userModel];
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user