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

macox: Add indexOfItem convenience method to shows data source


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent b4edb446
No related branches found
No related tags found
No related merge requests found
......@@ -75,4 +75,14 @@
[self.collectionView reloadData];
}
- (NSUInteger)indexOfMediaItem:(const NSUInteger)libraryId inArray:(NSArray const *)array
{
return [array indexOfObjectPassingTest:^BOOL(const id<VLCMediaLibraryItemProtocol> findItem,
const NSUInteger idx,
BOOL * const stop) {
NSAssert(findItem != nil, @"Collection should not contain nil items");
return findItem.libraryID == libraryId;
}];
}
@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