修正首页排行榜显示判断

This commit is contained in:
eggmanQQQ
2024-06-24 17:07:56 +08:00
parent 7320401f5d
commit b88be57677
2 changed files with 10 additions and 6 deletions

View File

@@ -113,8 +113,12 @@
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPNewHomeItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomeItemCell class]) forIndexPath:indexPath];
if(indexPath.row < self.itemList.count){
cell.itemModel = self.itemList[indexPath.row];
cell.rankAvatarsModelArray = self.rankAvatars;
if (indexPath.row == 0) {
cell.rankAvatarsModelArray = self.rankAvatars;
cell.itemModel = self.itemList[indexPath.row];
} else {
cell.itemModel = self.itemList[indexPath.row];
}
}
@kWeakify(self);
cell.didTapRankArea = ^{