Bläddra i källkod

test rename e2e file

Marino Faggiana 7 år sedan
förälder
incheckning
8dab07f3c0
1 ändrade filer med 21 tillägg och 24 borttagningar
  1. 21 24
      iOSClient/Main/CCMain.m

+ 21 - 24
iOSClient/Main/CCMain.m

@@ -4160,41 +4160,38 @@
                                     [self performSelector:@selector(openIn:) withObject:_metadata];
                                 }];
         
-        if (!isFolderEncrypted) {
-        
-            [actionSheet addButtonWithTitle:NSLocalizedString(@"_rename_", nil)
-                                      image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetRename"] color:[NCBrandColor sharedInstance].brand]
-                            backgroundColor:[UIColor whiteColor]
-                                     height: 50.0
-                                       type:AHKActionSheetButtonTypeDefault
-                                    handler:^(AHKActionSheet *as) {
+        [actionSheet addButtonWithTitle:NSLocalizedString(@"_rename_", nil)
+                                  image:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetRename"] color:[NCBrandColor sharedInstance].brand]
+                        backgroundColor:[UIColor whiteColor]
+                                 height: 50.0
+                                   type:AHKActionSheetButtonTypeDefault
+                                handler:^(AHKActionSheet *as) {
                                     
-                                        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_rename_",nil) message:nil preferredStyle:UIAlertControllerStyleAlert];
+                                    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_rename_",nil) message:nil preferredStyle:UIAlertControllerStyleAlert];
                                     
-                                        [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
+                                    [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
                                             textField.text = _metadata.fileNameView;
                                             [textField addTarget:self action:@selector(minCharTextFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
-                                        }];
+                                    }];
                                     
-                                        UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                                            NSLog(@"[LOG] Cancel action");
-                                        }];
+                                    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+                                        NSLog(@"[LOG] Cancel action");
+                                    }];
                                     
-                                        UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+                                    UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
                                         
-                                            UITextField *fileName = alertController.textFields.firstObject;
+                                        UITextField *fileName = alertController.textFields.firstObject;
                                         
-                                            [self performSelectorOnMainThread:@selector(renameFile:) withObject:[NSMutableArray arrayWithObjects:_metadata,fileName.text, nil] waitUntilDone:NO];
-                                        }];
+                                        [self performSelectorOnMainThread:@selector(renameFile:) withObject:[NSMutableArray arrayWithObjects:_metadata,fileName.text, nil] waitUntilDone:NO];
+                                    }];
                                     
-                                        okAction.enabled = NO;
+                                    okAction.enabled = NO;
                                     
-                                        [alertController addAction:cancelAction];
-                                        [alertController addAction:okAction];
+                                    [alertController addAction:cancelAction];
+                                    [alertController addAction:okAction];
                                     
-                                        [self presentViewController:alertController animated:YES completion:nil];
-            }];
-        }
+                                    [self presentViewController:alertController animated:YES completion:nil];
+        }];
         
         if (!isFolderEncrypted) {