Browse Source

new Class

Marino Faggiana 6 years ago
parent
commit
8655c17408
3 changed files with 10 additions and 10 deletions
  1. 4 4
      iOSClient/Favorites/CCFavorites.m
  2. 2 2
      iOSClient/Main/CCMain.m
  3. 4 4
      iOSClient/Transfers/CCTransfers.m

+ 4 - 4
iOSClient/Favorites/CCFavorites.m

@@ -662,22 +662,22 @@
 {
     tableMetadata *metadata = [_dataSource objectAtIndex:indexPath.row];
     if (metadata == nil || [[NCManageDatabase sharedInstance] isTableInvalidated:metadata]) {
-        return [tableView dequeueReusableCellWithIdentifier:@"CellMain"];
+        return [CCCellMain new];
     }
     
     NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:metadata.directoryID];
     if (serverUrl == nil) {
-        return [tableView dequeueReusableCellWithIdentifier:@"CellMain"];
+        return [CCCellMain new];
     }
     
     tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, serverUrl]];
     if (directory == nil) {
-        return [tableView dequeueReusableCellWithIdentifier:@"CellMain"];
+        return [CCCellMain new];
     }
     
     tableMetadata *metadataFolder = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", directory.fileID]];
     if (metadataFolder == nil) {
-        return [tableView dequeueReusableCellWithIdentifier:@"CellMain"];
+        return [CCCellMain new];
     }
     
     // Download thumbnail

+ 2 - 2
iOSClient/Main/CCMain.m

@@ -4250,12 +4250,12 @@
     tableMetadata *metadata = [[NCMainCommon sharedInstance] getMetadataFromSectionDataSourceIndexPath:indexPath sectionDataSource:sectionDataSource];
     
     if (metadata == nil || [[NCManageDatabase sharedInstance] isTableInvalidated:metadata]) {
-        return [tableView dequeueReusableCellWithIdentifier:@"CellMain"];
+        return [CCCellMain new];
     }
     
     NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:metadata.directoryID];
     if (serverUrl == nil) {
-        return [tableView dequeueReusableCellWithIdentifier:@"CellMain"];
+        return [CCCellMain new];
     }
     
     NSString *shareLink = [appDelegate.sharesLink objectForKey:[serverUrl stringByAppendingString:metadata.fileName]];

+ 4 - 4
iOSClient/Transfers/CCTransfers.m

@@ -422,22 +422,22 @@
     NSString *fileID = [[sectionDataSource.sectionArrayRow objectForKey:[sectionDataSource.sections objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row];
     tableMetadata *metadata = [sectionDataSource.allRecordsDataSource objectForKey:fileID];
     if (metadata == nil || [[NCManageDatabase sharedInstance] isTableInvalidated:metadata]) {
-        return [[CCCellMainTransfer alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CCCellMainTransfer"];
+        return [CCCellMainTransfer new];
     }
     
     NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:metadata.directoryID];
     if (serverUrl == nil) {
-        return [[CCCellMainTransfer alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CCCellMainTransfer"];
+        return [CCCellMainTransfer new];
     }
     
     tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, serverUrl]];
     if (directory == nil) {
-        return [[CCCellMainTransfer alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CCCellMainTransfer"];
+        return [CCCellMainTransfer new];
     }
     
     tableMetadata *metadataFolder = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", directory.fileID]];
     if (metadataFolder == nil) {
-        return [[CCCellMainTransfer alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CCCellMainTransfer"];
+        return [CCCellMainTransfer new];
     }
     
     UITableViewCell *cell = [[NCMainCommon sharedInstance] cellForRowAtIndexPath:indexPath tableView:tableView metadata:metadata metadataFolder:metadataFolder serverUrl:serverUrl autoUploadFileName:@"" autoUploadDirectory:@""];