Skip to content

Commit

Permalink
Fix bad merge reverting a data check for header/footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Jun 7, 2024
1 parent 8dec21b commit 4eb498f
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions VirtualListView/Apple/CvDataSource.ios.maccatalyst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,18 @@ public override UICollectionViewCell GetCell(UICollectionView collectionView, NS
if (info is not null)
{
data = Handler?.PositionalViewSelector?.Adapter?.DataFor(info.Kind, info.SectionIndex, info.ItemIndex);

var reuseId = Handler?.PositionalViewSelector?.ViewSelector?.GetReuseId(info, data);

if (data is not null)
nativeReuseId = info.Kind switch
{
var reuseId = Handler?.PositionalViewSelector?.ViewSelector?.GetReuseId(info, data);

nativeReuseId = info.Kind switch
{
PositionKind.Item => itemIdManager.GetReuseId(collectionView, reuseId),
PositionKind.SectionHeader => sectionHeaderIdManager.GetReuseId(collectionView, reuseId),
PositionKind.SectionFooter => sectionFooterIdManager.GetReuseId(collectionView, reuseId),
PositionKind.Header => globalIdManager.GetReuseId(collectionView, reuseId),
PositionKind.Footer => globalIdManager.GetReuseId(collectionView, reuseId),
_ => CvCell.ReuseIdUnknown,
};
}
PositionKind.Item => itemIdManager.GetReuseId(collectionView, reuseId),
PositionKind.SectionHeader => sectionHeaderIdManager.GetReuseId(collectionView, reuseId),
PositionKind.SectionFooter => sectionFooterIdManager.GetReuseId(collectionView, reuseId),
PositionKind.Header => globalIdManager.GetReuseId(collectionView, reuseId),
PositionKind.Footer => globalIdManager.GetReuseId(collectionView, reuseId),
_ => CvCell.ReuseIdUnknown,
};
}

var nativeCell = collectionView.DequeueReusableCell(nativeReuseId, indexPath);
Expand Down

0 comments on commit 4eb498f

Please sign in to comment.