Commit 3fb51c26 authored by Pierre SAGASPE's avatar Pierre SAGASPE Committed by Felix Paul Kühne

gDrive: hide download button if it is a folder

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 8ea5bfcb
......@@ -31,6 +31,8 @@
@property (nonatomic, retain) BoxItem *boxFile;
@property (nonatomic, retain) VLCOneDriveObject *oneDriveFile;
@property (nonatomic, readwrite) BOOL isDownloadable;
+ (VLCCloudStorageTableViewCell *)cellWithReuseIdentifier:(NSString *)ident;
+ (CGFloat)heightOfCell;
......
......@@ -204,4 +204,9 @@
return 48.;
}
- (void)setIsDownloadable:(BOOL)isDownloadable
{
self.downloadButton.hidden = !isDownloadable;
}
@end
......@@ -107,6 +107,11 @@
cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier];
cell.driveFile = _googleDriveController.currentListFiles[indexPath.row];
if ([cell.driveFile.mimeType isEqualToString:@"application/vnd.google-apps.folder"])
[cell setIsDownloadable:NO];
else
[cell setIsDownloadable:YES];
cell.delegate = self;
return cell;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment