forked from zelo72/mastodon-ios
fix: find friend entry not present search scene issue
This commit is contained in:
parent
647f87744b
commit
2b19307e57
|
@ -316,7 +316,9 @@ extension HomeTimelineViewController {
|
|||
}
|
||||
|
||||
@objc private func manuallySearchButtonPressed(_ sender: UIButton) {
|
||||
coordinator.switchToTabBar(tab: .search)
|
||||
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
|
||||
let searchDetailViewModel = SearchDetailViewModel()
|
||||
coordinator.present(scene: .searchDetail(viewModel: searchDetailViewModel), from: self, transition: .modal(animated: true, completion: nil))
|
||||
}
|
||||
|
||||
@objc private func settingBarButtonItemPressed(_ sender: UIBarButtonItem) {
|
||||
|
|
|
@ -224,8 +224,11 @@ extension SearchDetailViewController {
|
|||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
if navigationController?.viewControllers.count != 1 {
|
||||
// set bar hidden but not when self is root
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
@ -263,8 +266,14 @@ extension SearchDetailViewController: UISearchBarDelegate {
|
|||
|
||||
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
|
||||
logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)")
|
||||
|
||||
// dismiss or pop
|
||||
if isModal {
|
||||
dismiss(animated: true, completion: nil)
|
||||
} else {
|
||||
navigationController?.popViewController(animated: false)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue