mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-04 19:29:41 +00:00
Fix a crash by dismissing the active search before presenting the Add Feed sheet.
This commit is contained in:
1 parent
26de11a799
commit
bb72304e77
2 files changed
+22
-3
No files matched your search
@@ -350,8 +350,19 @@ final class MainTimelineModernViewController: UIViewController, UndoableCommandR
|
||||
updateToolbar()
|
||||
}
|
||||
|
||||
func hideSearch() {
|
||||
navigationItem.searchController?.isActive = false
|
||||
func hideSearch(completion: (() -> Void)? = nil) {
|
||||
guard let searchController = navigationItem.searchController, searchController.isActive else {
|
||||
completion?()
|
||||
return
|
||||
}
|
||||
searchController.isActive = false
|
||||
guard let transitionCoordinator = searchController.transitionCoordinator else {
|
||||
completion?()
|
||||
return
|
||||
}
|
||||
transitionCoordinator.animate(alongsideTransition: nil) { _ in
|
||||
completion?()
|
||||
}
|
||||
}
|
||||
|
||||
func showSearchAll() {
|
||||
|
||||
Reference in new issue
Block a user