Marino Faggiana 7 years ago
parent
commit
0f4b7b0885
1 changed files with 17 additions and 2 deletions
  1. 17 2
      iOSClient/Main/CCMain.m

+ 17 - 2
iOSClient/Main/CCMain.m

@@ -4034,10 +4034,11 @@
                                         }
                                     }];
         }
-        
+
+#ifdef DEBUG
         if (!([_metadata.fileName isEqualToString:autoUploadFileName] == YES && [serverUrl isEqualToString:autoUploadDirectory] == YES) && !lockDirectory && [CCUtility isEndToEndEnabled:app.activeAccount]) {
             
-            [actionSheet addButtonWithTitle:titoloCriptaDecripta
+            [actionSheet addButtonWithTitle:@"Mark as encrypted"
                                       image:[UIImage imageNamed:@"actionSheetCrypto"]
                             backgroundColor:[UIColor whiteColor]
                                      height: 50.0
@@ -4048,6 +4049,20 @@
                                     }];
         }
         
+        if (!([_metadata.fileName isEqualToString:autoUploadFileName] == YES && [serverUrl isEqualToString:autoUploadDirectory] == YES) && !lockDirectory && [CCUtility isEndToEndEnabled:app.activeAccount]) {
+            
+            [actionSheet addButtonWithTitle:@"Delete as encrypted"
+                                      image:[UIImage imageNamed:@"actionSheetCrypto"]
+                            backgroundColor:[UIColor whiteColor]
+                                     height: 50.0
+                                       type:AHKActionSheetButtonTypeEncrypted
+                                    handler:^(AHKActionSheet *as) {
+                                        
+                                        [app.endToEndInterface deleteEndToEndFolderEncrypted:_metadata];
+                                    }];
+        }
+#endif
+        
         if (!([_metadata.fileName isEqualToString:autoUploadFileName] == YES && [serverUrl isEqualToString:autoUploadDirectory] == YES)) {
             
             [actionSheet addButtonWithTitle:titoloLock