소스 검색

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;