修复个播房非离开模式下礼物面板没有房主

This commit is contained in:
chenguilong
2022-03-10 11:50:54 +08:00
parent 912c5b2184
commit 1923978f38
3 changed files with 37 additions and 3 deletions

View File

@@ -191,7 +191,23 @@
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;
}