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 @@ ...@@ -31,6 +31,8 @@
@property (nonatomic, retain) BoxItem *boxFile; @property (nonatomic, retain) BoxItem *boxFile;
@property (nonatomic, retain) VLCOneDriveObject *oneDriveFile; @property (nonatomic, retain) VLCOneDriveObject *oneDriveFile;
@property (nonatomic, readwrite) BOOL isDownloadable;
+ (VLCCloudStorageTableViewCell *)cellWithReuseIdentifier:(NSString *)ident; + (VLCCloudStorageTableViewCell *)cellWithReuseIdentifier:(NSString *)ident;
+ (CGFloat)heightOfCell; + (CGFloat)heightOfCell;
......
...@@ -204,4 +204,9 @@ ...@@ -204,4 +204,9 @@
return 48.; return 48.;
} }
- (void)setIsDownloadable:(BOOL)isDownloadable
{
self.downloadButton.hidden = !isDownloadable;
}
@end @end
...@@ -107,6 +107,11 @@ ...@@ -107,6 +107,11 @@
cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier]; cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier];
cell.driveFile = _googleDriveController.currentListFiles[indexPath.row]; 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; cell.delegate = self;
return cell; 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