|
@@ -1411,19 +1411,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // addLocal
|
|
|
- if ([selector isEqualToString:selectorAddLocal]) {
|
|
|
-
|
|
|
- [CCUtility copyFileAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, metadata.fileID] toPath:[NSString stringWithFormat:@"%@/%@", [CCUtility getDirectoryLocal], metadata.fileNamePrint]];
|
|
|
-
|
|
|
- UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
|
|
|
- [CCGraphics saveIcoWithEtag:metadata.fileNamePrint image:image writeToFile:nil copy:YES move:NO fromPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID] toPath:[NSString stringWithFormat:@"%@/.%@.ico", [CCUtility getDirectoryLocal], metadata.fileNamePrint]];
|
|
|
-
|
|
|
- [app messageNotification:@"_add_local_" description:@"_file_saved_local_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeSuccess errorCode:0];
|
|
|
-
|
|
|
- [self reloadDatasource:serverUrl];
|
|
|
- }
|
|
|
-
|
|
|
// Open with...
|
|
|
if ([selector isEqualToString:selectorOpenIn] && [[UIApplication sharedApplication] applicationState] == UIApplicationStateActive) {
|
|
|
|
|
@@ -3279,33 +3266,6 @@
|
|
|
[[CCActions sharedInstance] settingFavorite:metadata favorite:NO delegate:self];
|
|
|
}
|
|
|
|
|
|
-#pragma --------------------------------------------------------------------------------------------
|
|
|
-#pragma mark ===== Local =====
|
|
|
-#pragma --------------------------------------------------------------------------------------------
|
|
|
-
|
|
|
-- (void)addLocal:(tableMetadata *)metadata
|
|
|
-{
|
|
|
- if (metadata.errorPasscode || !metadata.uuid) return;
|
|
|
-
|
|
|
- NSString *serverUrl = [[NCManageDatabase sharedInstance] getServerUrl:metadata.directoryID];
|
|
|
- if (!serverUrl) return;
|
|
|
-
|
|
|
- if ([metadata.type isEqualToString: k_metadataType_file])
|
|
|
- [[CCNetworking sharedNetworking] downloadFile:metadata.fileID serverUrl:serverUrl downloadData:YES downloadPlist:NO selector:selectorAddLocal selectorPost:nil session:k_download_session taskStatus:k_taskStatusResume delegate:self];
|
|
|
-
|
|
|
- if ([metadata.type isEqualToString: k_metadataType_template]) {
|
|
|
-
|
|
|
- [CCUtility copyFileAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, metadata.fileName] toPath:[NSString stringWithFormat:@"%@/%@", [CCUtility getDirectoryLocal], metadata.fileName]];
|
|
|
-
|
|
|
- [app messageNotification:@"_add_local_" description:@"_file_saved_local_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeSuccess errorCode:0];
|
|
|
- }
|
|
|
-
|
|
|
- NSIndexPath *indexPath = [_sectionDataSource.fileIDIndexPath objectForKey:metadata.fileID];
|
|
|
-
|
|
|
- if ([self indexPathIsValid:indexPath])
|
|
|
- [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic];
|
|
|
-}
|
|
|
-
|
|
|
#pragma --------------------------------------------------------------------------------------------
|
|
|
#pragma mark ===== Open in... =====
|
|
|
#pragma --------------------------------------------------------------------------------------------
|