Commit fce99f44 authored by Carola Nitz's avatar Carola Nitz Committed by Felix Paul Kühne

VLCDropBoxController: sort dropbox files before presenting

parent 771b1d8c
Pipeline #177 failed with stage
in 0 seconds
......@@ -198,7 +198,11 @@
}
[[[self client].filesRoutes listFolder:path] setResponseBlock:^(DBFILESListFolderResult * _Nullable result, DBFILESListFolderError * _Nullable routeError, DBRequestError * _Nullable networkError) {
if (result) {
_currentFileList = [NSArray arrayWithArray:result.entries];
_currentFileList = [result.entries sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
NSString *first = [(DBFILESMetadata*)a name];
NSString *second = [(DBFILESMetadata*)b name];
return [first caseInsensitiveCompare:second];
}];
APLog(@"found filtered metadata for %lu files", (unsigned long)_currentFileList.count);
if ([self.delegate respondsToSelector:@selector(mediaListUpdated)])
[self.delegate mediaListUpdated];
......
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