Commit 715211ef authored by Tobias's avatar Tobias Committed by Felix Paul Kühne

for library mode none return empty array add nullability annotations

parent ce80f390
......@@ -23,7 +23,7 @@ typedef NS_ENUM(NSUInteger, VLCLibraryMode) {
@interface MLMediaLibrary (playlist)
- (NSArray *)playlistArrayForGroupObject:(id)groupObject;
- (NSArray *)playlistArrayForLibraryMode:(VLCLibraryMode)libraryMode;
- (nonnull NSArray *)playlistArrayForGroupObject:(nonnull id)groupObject;
- (nonnull NSArray *)playlistArrayForLibraryMode:(VLCLibraryMode)libraryMode;
@end
......@@ -19,7 +19,7 @@
@implementation MLMediaLibrary (playlist)
- (NSArray *)playlistArrayForGroupObject:(id)groupObject
- (nonnull NSArray *)playlistArrayForGroupObject:(nonnull id)groupObject
{
if([groupObject isKindOfClass:[MLLabel class]]) {
return [(MLLabel *)groupObject sortedFolderItems];
......@@ -34,10 +34,13 @@
}
//TODO: this code could use refactoring to be more readable
- (NSArray *)playlistArrayForLibraryMode:(VLCLibraryMode)libraryMode
- (nonnull NSArray *)playlistArrayForLibraryMode:(VLCLibraryMode)libraryMode
{
NSMutableArray *objects = [NSMutableArray array];
if (libraryMode == VLCLibraryModeNone) {
return objects;
}
/* add all albums */
if (libraryMode != VLCLibraryModeAllSeries) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment