Browse Source

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 8 years ago
parent
commit
044a26a4d4
2 changed files with 1 additions and 14 deletions
  1. 1 0
      Sources/VLCOneDriveObject.m
  2. 0 14
      Sources/VLCOneDriveTableViewController.m

+ 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;