Skip to content
Snippets Groups Projects
Commit e1fb0508 authored by Claudio Cambra's avatar Claudio Cambra Committed by Felix Paul Kühne
Browse files

macosx: Implement representedItemsAtIndexPaths for shows data source


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent 8b03862e
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,24 @@
return show.episodes[indexPath.item];
}
- (NSArray<VLCLibraryRepresentedItem *> *)representedItemsAtIndexPaths:(NSSet<NSIndexPath *> *const)indexPaths
forCollectionView:(NSCollectionView *)collectionView
{
NSMutableArray<VLCLibraryRepresentedItem *> * const representedItems =
[NSMutableArray arrayWithCapacity:indexPaths.count];
for (NSIndexPath * const indexPath in indexPaths) {
const id<VLCMediaLibraryItemProtocol> libraryItem =
[self libraryItemAtIndexPath:indexPath forCollectionView:collectionView];
VLCLibraryRepresentedItem * const representedItem =
[[VLCLibraryRepresentedItem alloc] initWithItem:libraryItem
parentType:self.currentParentType];
[representedItems addObject:representedItem];
}
return representedItems;
}
- (NSInteger)numberOfSectionsInCollectionView:(NSCollectionView *)collectionView
{
return self.showsArray.count;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment