|
@@ -590,6 +590,7 @@
|
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
{
|
|
tableShare *shareCell;
|
|
tableShare *shareCell;
|
|
|
|
+ tableMetadata *metadataFolder;
|
|
|
|
|
|
tableMetadata *metadata = [[NCMainCommon sharedInstance] getMetadataFromSectionDataSourceIndexPath:indexPath sectionDataSource:sectionDataSource];
|
|
tableMetadata *metadata = [[NCMainCommon sharedInstance] getMetadataFromSectionDataSourceIndexPath:indexPath sectionDataSource:sectionDataSource];
|
|
if (metadata == nil || [[NCManageDatabase sharedInstance] isTableInvalidated:metadata]) {
|
|
if (metadata == nil || [[NCManageDatabase sharedInstance] isTableInvalidated:metadata]) {
|
|
@@ -597,12 +598,10 @@
|
|
}
|
|
}
|
|
|
|
|
|
tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, metadata.serverUrl]];
|
|
tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", appDelegate.activeAccount, metadata.serverUrl]];
|
|
- if (directory == nil) {
|
|
|
|
- return [CCCellMain new];
|
|
|
|
|
|
+ if (directory != nil) {
|
|
|
|
+ metadataFolder = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"ocId == %@", directory.ocId]];
|
|
}
|
|
}
|
|
|
|
|
|
- tableMetadata *metadataFolder = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"ocId == %@", directory.ocId]];
|
|
|
|
-
|
|
|
|
for (tableShare *share in appDelegate.shares) {
|
|
for (tableShare *share in appDelegate.shares) {
|
|
if ([share.serverUrl isEqualToString:metadata.serverUrl] && [share.fileName isEqualToString:metadata.fileName]) {
|
|
if ([share.serverUrl isEqualToString:metadata.serverUrl] && [share.fileName isEqualToString:metadata.fileName]) {
|
|
shareCell = share;
|
|
shareCell = share;
|