marinofaggiana 3 years ago
parent
commit
0d2789d63d

+ 1 - 1
iOSClient/More/NCMore.swift

@@ -252,7 +252,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         if indexPath.section == 0 {
             return 100
         } else {
-            return 50
+            return NCGlobal.shared.heightCellSettings
         }
     }
     

+ 3 - 0
iOSClient/NCGlobal.swift

@@ -86,6 +86,9 @@ class NCGlobal: NSObject {
     @objc let introLogin: Int                       = 0
     let introSignup: Int                            = 1
     
+    // Varie height
+    @objc let heightCellSettings: CGFloat           = 50
+    
     // Avatar & Preview size
     //
     let avatarSize: Int                             = 512

+ 8 - 6
iOSClient/Settings/CCAdvanced.m

@@ -351,9 +351,7 @@
     }
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark === Clear Cache ===
-#pragma --------------------------------------------------------------------------------------------
+#pragma mark - Clear Cache
 
 - (void)clearCache
 {
@@ -412,9 +410,7 @@
     [self presentViewController:alertController animated:YES completion:nil];
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark == Exit Nextcloud ==
-#pragma --------------------------------------------------------------------------------------------
+#pragma mark - Exit Nextcloud
 
 - (void)exitNextcloud:(XLFormRowDescriptor *)sender
 {
@@ -452,4 +448,10 @@
     [self presentViewController:alertController animated:YES completion:nil];
 }
 
+#pragma mark -
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return NCGlobal.shared.heightCellSettings;
+}
+
 @end

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -455,7 +455,7 @@
     if (indexPath.section == 0) {
         return 60;
     } else {
-        return 40;
+        return NCGlobal.shared.heightCellSettings;
     }
 }
 

+ 4 - 0
iOSClient/Settings/CCManageAutoUpload.m

@@ -446,6 +446,10 @@
     self.form.delegate = self;
 }
 
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return NCGlobal.shared.heightCellSettings;
+}
+
 - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
 {
     tableAccount *activeAccount = [[NCManageDatabase shared] getActiveAccount];

+ 6 - 0
iOSClient/Settings/NCManageAutoUploadFileName.swift

@@ -215,4 +215,10 @@ class NCManageAutoUploadFileName: XLFormViewController {
         
         return String(format: NSLocalizedString("_preview_filename_", comment: ""), "MM,MMM,DD,YY,YYYY and HH,hh,mm,ss,ampm") + ":" + "\n\n" + returnString
     }
+    
+    // MARK: -
+
+    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return NCGlobal.shared.heightCellSettings
+    }
 }

+ 8 - 6
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -210,9 +210,7 @@
     [[self navigationController] popViewControllerAnimated:YES];
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark === Action ===
-#pragma --------------------------------------------------------------------------------------------
+#pragma mark - Action
 
 - (void)startE2E:(XLFormRowDescriptor *)sender
 {
@@ -403,9 +401,7 @@
     }];
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark === Delegate ===
-#pragma --------------------------------------------------------------------------------------------
+#pragma mark - Delegate
 
 - (void)endToEndInitializeSuccess
 {
@@ -415,4 +411,10 @@
     [self initializeForm];
 }
 
+#pragma mark -
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return NCGlobal.shared.heightCellSettings;
+}
+
 @end

+ 4 - 0
iOSClient/Settings/NCSettings.m

@@ -394,6 +394,10 @@
 
 #pragma mark -
 
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return NCGlobal.shared.heightCellSettings;
+}
+
 - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
 {
     NSString *sectionName;