Fix a crash by dismissing the active search before presenting the Add Feed sheet.

This commit is contained in:
Brent Simmons committed 2026-08-14 10:47:48 -07:00
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() {