Prechádzať zdrojové kódy

onedrive : displaying the number of items in bottom bar
(cherry picked from commit d4634a7e6ed5c0164328667c8418007d268ffa4e)

Pierre SAGASPE 9 rokov pred
rodič
commit
d16f001352
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 8 0
      Sources/VLCOneDriveTableViewController.m

+ 8 - 0
Sources/VLCOneDriveTableViewController.m

@@ -94,6 +94,14 @@
 {
     [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