diff --git a/Calendarr iOS/Views/Calendar/CalendarHostView.swift b/Calendarr iOS/Views/Calendar/CalendarHostView.swift index 78c4164..6e9e99f 100644 --- a/Calendarr iOS/Views/Calendar/CalendarHostView.swift +++ b/Calendarr iOS/Views/Calendar/CalendarHostView.swift @@ -112,6 +112,12 @@ struct CalendarHostView: View { .overlay(alignment: .top) { if let err = store.lastError { errorBannerView(err).padding(.top, 8) } } + // The month title uses `.navigationTitle` rather than a + // `.principal` ToolbarItem: a principal item disappears when the + // state it reads (visibleMonth) changes while on screen (month + // change / scroll), reappearing only on an unrelated rebuild. + // navigationTitle is updated reliably by the system. + .navigationTitle(titleString) .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .navigationBarLeading) { @@ -121,12 +127,6 @@ struct CalendarHostView: View { Button(L10n.t("nav.today", appLang)) { store.moveToToday() }.font(.callout) } } - ToolbarItem(placement: .principal) { - Text(titleString) - .font(.headline) - .lineLimit(1) - .minimumScaleFactor(0.7) - } ToolbarItem(placement: .navigationBarTrailing) { HStack(spacing: 8) { if !groups.isEmpty { groupMenu }