forked from organicmaps/organicmaps-tmp
[iOS] sometimes on iOS10 downloaded categories not displayed, fixed
This commit is contained in:
parent
b2a37ece23
commit
d414978221
1 changed files with 9 additions and 3 deletions
|
@ -30,13 +30,13 @@ class DownloadedBookmarksViewController: MWMViewController {
|
|||
tableView.tableFooterView = bottomView
|
||||
tableView.registerNib(cell: CatalogCategoryCell.self)
|
||||
tableView.registerNibForHeaderFooterView(BMCCategoriesHeader.self)
|
||||
if #available(iOS 11, *) { return } // workaround for https://jira.mail.ru/browse/MAPSME-8101
|
||||
reloadData()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
dataSource.reloadData()
|
||||
noDataView.isHidden = dataSource.categoriesCount > 0
|
||||
tableView.reloadData()
|
||||
reloadData()
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
|
@ -61,6 +61,12 @@ class DownloadedBookmarksViewController: MWMViewController {
|
|||
animated: true)
|
||||
}
|
||||
|
||||
private func reloadData() {
|
||||
dataSource.reloadData()
|
||||
noDataView.isHidden = dataSource.categoriesCount > 0
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
private func setCategoryVisible(_ visible: Bool, at index: Int) {
|
||||
dataSource.setCategory(visible: visible, at: index)
|
||||
let categoriesHeader = tableView.headerView(forSection: 0) as! BMCCategoriesHeader
|
||||
|
|
Loading…
Add table
Reference in a new issue