Selaa lähdekoodia

use self-sizing AvatarSelectionCell in EditSettingsController

cyberta 5 vuotta sitten
vanhempi
commit
edb31b4692
1 muutettua tiedostoa jossa 3 lisäystä ja 10 poistoa
  1. 3 10
      deltachat-ios/Controller/EditSettingsController.swift

+ 3 - 10
deltachat-ios/Controller/EditSettingsController.swift

@@ -103,17 +103,10 @@ class EditSettingsController: UITableViewController, MediaPickerDelegate {
     }
 
     override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        if indexPath.section == section1 {
-            switch indexPath.row {
-            case section1Avatar:
-                return AvatarSelectionCell.cellHeight
-            case section1Status:
-                return MultilineTextFieldCell.cellHeight
-            default:
-                 return Constants.defaultCellHeight
-            }
+        if indexPath.section == section1 && indexPath.row == section1Status {
+            return MultilineTextFieldCell.cellHeight
         } else {
-            return Constants.defaultCellHeight
+            return UITableView.automaticDimension
         }
     }