Set row height when table is empty and set to automatic when articles are present. Issue #1919
This commit is contained in:
parent
d3033a12e2
commit
8a75defee9
@ -630,6 +630,12 @@ private extension MasterTimelineViewController {
|
||||
}
|
||||
|
||||
func applyChanges(animated: Bool, completion: (() -> Void)? = nil) {
|
||||
if coordinator.articles.count == 0 {
|
||||
tableView.rowHeight = tableView.estimatedRowHeight
|
||||
} else {
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
}
|
||||
|
||||
var snapshot = NSDiffableDataSourceSnapshot<Int, Article>()
|
||||
snapshot.appendSections([0])
|
||||
snapshot.appendItems(coordinator.articles, toSection: 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user