浏览代码

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 年之前
父节点
当前提交
044a26a4d4
共有 2 个文件被更改,包括 1 次插入14 次删除
  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;