|
@@ -144,24 +144,6 @@
|
|
|
return [[NSAttributedString alloc] initWithString:text attributes:attributes];
|
|
|
}
|
|
|
|
|
|
-#pragma --------------------------------------------------------------------------------------------
|
|
|
-#pragma mark ==== Download Thumbnail ====
|
|
|
-#pragma --------------------------------------------------------------------------------------------
|
|
|
-
|
|
|
-- (void)downloadThumbnail:(tableMetadata *)metadata serverUrl:(NSString *)serverUrl indexPath:(NSIndexPath *)indexPath
|
|
|
-{
|
|
|
- CGFloat width = [[NCUtility sharedInstance] getScreenWidthForPreview];
|
|
|
- CGFloat height = [[NCUtility sharedInstance] getScreenHeightForPreview];
|
|
|
-
|
|
|
- OCnetworking *ocNetworking = [[OCnetworking alloc] initWithDelegate:nil metadataNet:nil withUser:appDelegate.activeUser withUserID:appDelegate.activeUserID withPassword:appDelegate.activePassword withUrl:appDelegate.activeUrl];
|
|
|
-
|
|
|
- [ocNetworking downloadPreviewWithMetadata:metadata serverUrl:serverUrl withWidth:width andHeight:height completion:^(NSString *message, NSInteger errorCode) {
|
|
|
- if (errorCode == 0 && [[NSFileManager defaultManager] fileExistsAtPath:[CCUtility getDirectoryProviderStorageIconFileID:metadata.fileID fileNameView:metadata.fileNameView]] && [[NCMainCommon sharedInstance] isValidIndexPath:indexPath tableView:self.tableView]) {
|
|
|
- [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
|
|
|
- }
|
|
|
- }];
|
|
|
-}
|
|
|
-
|
|
|
#pragma --------------------------------------------------------------------------------------------
|
|
|
#pragma mark - ===== Progress & Task Button =====
|
|
|
#pragma --------------------------------------------------------------------------------------------
|
|
@@ -465,10 +447,8 @@
|
|
|
tableMetadata *metadataFolder = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", directory.fileID]];
|
|
|
|
|
|
// Download thumbnail
|
|
|
- if (metadata.hasPreview == 1 && ![CCUtility fileProviderStorageIconExists:metadata.fileID fileNameView:metadata.fileNameView]) {
|
|
|
- [self downloadThumbnail:metadata serverUrl:serverUrl indexPath:indexPath];
|
|
|
- }
|
|
|
-
|
|
|
+ [[NCNetworkingMain sharedInstance] downloadThumbnailWith:metadata serverUrl:serverUrl view:tableView indexPath:indexPath];
|
|
|
+
|
|
|
UITableViewCell *cell = [[NCMainCommon sharedInstance] cellForRowAtIndexPath:indexPath tableView:tableView metadata:metadata metadataFolder:metadataFolder serverUrl:serverUrl autoUploadFileName:@"" autoUploadDirectory:@""];
|
|
|
|
|
|
// TRANSFER
|