Procházet zdrojové kódy

iOS: Fix never ending UIRefreshControl in OneDrive

Adds the correct delegate to VLCOneDriveObject to allow the folderContentLoaded() method
to call the correct delegate(VLCOneDriveController) in the liveOperationSucceeded() callback.

This also removes unnecessary implementation of mediaListUpdated() method.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Soomin Lee před 8 roky
rodič
revize
044a26a4d4

+ 1 - 0
Sources/VLCOneDriveObject.m

@@ -90,6 +90,7 @@
         for (NSUInteger x = 0; x < count; x++) {
             VLCOneDriveObject *folder = self.folders[x];
             if (!folder.hasFullFolderTree) {
+                folder.delegate = self.delegate;
                 [folder loadFolderContent];
                 return;
             }

+ 0 - 14
Sources/VLCOneDriveTableViewController.m

@@ -91,20 +91,6 @@
 
 #pragma mark - table view delegate
 
-- (void)mediaListUpdated
-{
-    [self.tableView reloadData];
-    [self.activityIndicator stopAnimating];
-
-    NSUInteger count = self.controller.currentListFiles.count;
-    if (count == 0)
-        self.numberOfFilesBarButtonItem.title = NSLocalizedString(@"NO_FILES", nil);
-    else if (count != 1)
-        self.numberOfFilesBarButtonItem.title = [NSString stringWithFormat:NSLocalizedString(@"NUM_OF_FILES", nil), count];
-    else
-        self.numberOfFilesBarButtonItem.title = NSLocalizedString(@"ONE_FILE", nil);
-}
-
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
     NSArray *folderItems = _oneDriveController.currentFolder.items;