Fix layout issue on iOS 17/18 in the timeline toolbar.

This commit is contained in:
Brent Simmons committed 2026-03-31 09:12:29 -07:00
1 parent 50af78936c
commit ed510fba07
1 file changed
+6 -1
@@ -909,9 +909,14 @@ private extension MainTimelineModernViewController {
func configureToolbar() {
if traitCollection.userInterfaceIdiom == .phone {
toolbarItems?.insert(.flexibleSpace(), at: 1)
if #available(iOS 26, *) {
toolbarItems?.insert(.flexibleSpace(), at: 1)
toolbarItems?.insert(navigationItem.searchBarPlacementBarButtonItem, at: 2)
} else {
// Remove storyboard placeholder flex spaces so the progress view centers correctly.
if let markAllAsRead = toolbarItems?.first {
toolbarItems = [markAllAsRead]
}
}
}
updateToolbarProgressView()