Clear search results when no timeline fetcher is specified
This commit is contained in:
parent
2a00c879f8
commit
4bce625f18
|
@ -387,6 +387,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
|||
if tableView.indexPathForSelectedRow != indexPath {
|
||||
tableView.selectRow(at: indexPath, animated: true, scrollPosition: .middle)
|
||||
}
|
||||
} else {
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||
func beginSearching() {
|
||||
isSearching = true
|
||||
searchArticleIds = Set(articles.map { $0.articleID })
|
||||
timelineFetcher = nil
|
||||
selectFeed(nil)
|
||||
}
|
||||
|
||||
func endSearching() {
|
||||
|
@ -560,6 +560,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||
|
||||
if let ip = currentMasterIndexPath, let node = nodeFor(ip), let fetcher = node.representedObject as? ArticleFetcher {
|
||||
timelineFetcher = fetcher
|
||||
} else {
|
||||
timelineFetcher = nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue