Commit f5730272 authored by Carola Nitz's avatar Carola Nitz

VLCDropBoxController: sort dropbox files before presenting

(cherry picked from commit 73bd72ee)
parent 7dc66c6d
Pipeline #176 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