forked from shadowfacts/Tusker
Fix search section titles
This commit is contained in:
parent
05d79d5d03
commit
382decd7da
|
@ -156,8 +156,12 @@ extension SearchTableViewController {
|
|||
}
|
||||
|
||||
class DataSource: UITableViewDiffableDataSource<Section, Item> {
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
return Section.allCases[section].displayName
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection sectionIndex: Int) -> String? {
|
||||
let currentSnapshot = snapshot()
|
||||
for section in Section.allCases where currentSnapshot.indexOfSection(section) == sectionIndex {
|
||||
return section.displayName
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue