Change to not suggest root folder for Accounts that don't support it. Issue #1287

This commit is contained in:
Maurice Parker
2019-11-16 13:25:55 -06:00
parent 91a3e4fd73
commit 5ce5175bc0
6 changed files with 78 additions and 10 deletions

View File

@@ -68,11 +68,16 @@ class AddWebFeedFolderViewController: UITableViewController {
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.cellForRow(at: indexPath)
cell?.accessoryType = .checkmark
let container = containers[indexPath.row]
delegate?.didSelect(container: containers[indexPath.row])
navigationController?.popViewController(animated: true)
if let account = container as? Account, account.behaviors.contains(.disallowFeedInRootFolder) {
tableView.selectRow(at: nil, animated: false, scrollPosition: .none)
} else {
let cell = tableView.cellForRow(at: indexPath)
cell?.accessoryType = .checkmark
delegate?.didSelect(container: container)
navigationController?.popViewController(animated: true)
}
}
}