|
@@ -3705,6 +3705,7 @@
|
|
|
if (!lockServerUrl) return;
|
|
|
|
|
|
tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND serverUrl = %@", appDelegate.activeAccount, lockServerUrl]];
|
|
|
+ tableLocalFile *localFile = [[NCManageDatabase sharedInstance] getTableLocalFileWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", _metadata.fileID]];
|
|
|
|
|
|
if (directory.lock && [[CCUtility getBlockCode] length] && appDelegate.sessionePasscodeLock == nil) {
|
|
|
|
|
@@ -3718,6 +3719,12 @@
|
|
|
[self performSelector:@selector(deleteFile) withObject:nil];
|
|
|
}]];
|
|
|
|
|
|
+ if (localFile || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", appDelegate.directoryUser, _metadata.fileID]]) {
|
|
|
+ [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_remove_local_file_", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
|
+ [self performSelector:@selector(removeLocalFile:) withObject:_metadata];
|
|
|
+ }]];
|
|
|
+ }
|
|
|
+
|
|
|
[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
|
|
[alertController dismissViewControllerAnimated:YES completion:nil];
|
|
|
}]];
|
|
@@ -3765,8 +3772,6 @@
|
|
|
titoloLock = [NSString stringWithFormat:NSLocalizedString(@"_protect_passcode_", nil)];
|
|
|
}
|
|
|
|
|
|
- tableLocalFile *localFile = [[NCManageDatabase sharedInstance] getTableLocalFileWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", _metadata.fileID]];
|
|
|
-
|
|
|
// ******************************************* AHKActionSheet *******************************************
|
|
|
|
|
|
AHKActionSheet *actionSheet = [[AHKActionSheet alloc] initWithView:self.tabBarController.view title:nil];
|
|
@@ -4076,18 +4081,6 @@
|
|
|
[self actionDelete:indexPath];
|
|
|
}];
|
|
|
|
|
|
- if (localFile || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", appDelegate.directoryUser, _metadata.fileID]]) {
|
|
|
-
|
|
|
- [actionSheet addButtonWithTitle:NSLocalizedString(@"_remove_local_file_", nil)
|
|
|
- image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"removeMemory"] color:[NCBrandColor sharedInstance].brandElement]
|
|
|
- backgroundColor:[NCBrandColor sharedInstance].backgroundView
|
|
|
- height:50.0
|
|
|
- type:AHKActionSheetButtonTypeDefault
|
|
|
- handler:^(AHKActionSheet *as) {
|
|
|
- [self performSelector:@selector(removeLocalFile:) withObject:_metadata];
|
|
|
- }];
|
|
|
- }
|
|
|
-
|
|
|
[actionSheet show];
|
|
|
}
|
|
|
}
|