mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Use a constant for section & footer height
This commit is contained in:
parent
5c18b46e68
commit
ba6c9be372
1 changed files with 3 additions and 2 deletions
|
@ -24,6 +24,7 @@ final class RoomInfoListViewController: UIViewController {
|
|||
|
||||
private enum Constants {
|
||||
static let defaultStyleCellReuseIdentifier = "default"
|
||||
static let tableViewSectionMinHeight: CGFloat = 8.0
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
@ -370,14 +371,14 @@ extension RoomInfoListViewController: UITableViewDelegate {
|
|||
|
||||
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
if sections[section].header == nil {
|
||||
return 8
|
||||
return Constants.tableViewSectionMinHeight
|
||||
}
|
||||
return UITableView.automaticDimension
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
|
||||
if sections[section].footer == nil {
|
||||
return 8
|
||||
return Constants.tableViewSectionMinHeight
|
||||
}
|
||||
return UITableView.automaticDimension
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue