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

macosx: Implement itemForRepresentedObjectAtIndexPath in shows data source


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent bb73bd05
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,10 @@
#import "extensions/NSPasteboardItem+VLCAdditions.h"
#import "library/VLCLibraryCollectionViewItem.h"
#import "library/VLCLibraryCollectionViewFlowLayout.h"
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryRepresentedItem.h"
@interface VLCLibraryShowsDataSource ()
......@@ -198,4 +200,17 @@
return self.showsArray[section].episodeCount;
}
- (NSCollectionViewItem *)collectionView:(NSCollectionView *)collectionView
itemForRepresentedObjectAtIndexPath:(NSIndexPath *)indexPath
{
VLCLibraryCollectionViewItem * const viewItem =
[collectionView makeItemWithIdentifier:VLCLibraryCellIdentifier forIndexPath:indexPath];
const id<VLCMediaLibraryItemProtocol> item =
[self libraryItemAtIndexPath:indexPath forCollectionView:collectionView];
VLCLibraryRepresentedItem * const representedItem =
[[VLCLibraryRepresentedItem alloc] initWithItem:item parentType:self.currentParentType];
viewItem.representedItem = representedItem;
return viewItem;
}
@end
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