Commit c2cb6dae authored by Felix Paul Kühne's avatar Felix Paul Kühne

box controller: simplify code

parent edfbdd42
......@@ -205,14 +205,6 @@
}
#endif
- (BOOL)_supportedFileExtension:(NSString *)filename
{
if ([filename isSupportedMediaFormat] || [filename isSupportedAudioMediaFormat] || [filename isSupportedSubtitleFormat])
return YES;
return NO;
}
//just pick out Directories and supported formats.
//if the resulting list contains less than 10 items try to get more
......@@ -230,7 +222,7 @@
BOOL supportedFile = NO;
if (!isDirectory) {
BoxFile * file = (BoxFile *)boxFile;
supportedFile = [self _supportedFileExtension:[NSString stringWithFormat:@".%@",file.name.lastPathComponent]];
supportedFile = [[NSString stringWithFormat:@".%@",file.name.lastPathComponent] isSupportedFormat];
}
if (isDirectory || supportedFile)
......
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