Hide search controller when no items are present. Related to Issue #1195

This commit is contained in:
Maurice Parker 2019-11-03 08:36:14 -06:00
parent 2a59a28a53
commit 21d5c321b4
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
override func viewWillAppear(_ animated: Bool) {
applyChanges(animate: false)
super.viewWillAppear(animated)
if dataSource.snapshot().numberOfItems < 1 {
navigationItem.searchController?.isActive = false
}
}
override func viewDidAppear(_ animated: Bool) {