fix: Liquid Glass month title updates via @Observable store (visibleMonth)

The system NavigationStack toolbar title would not refresh on a plain @State
change (title kept disappearing on iPhone). Moved visibleMonth into the
@Observable CalendarStore so the toolbar's read is tracked with @Observable's
fine-grained observation and refreshes on month change. Reverted the @State/.id
workaround. Real system glass bar retained.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-06-01 19:06:53 +02:00
parent 51218b9aa3
commit 451d3d4d6b
3 changed files with 13 additions and 17 deletions

View File

@@ -51,6 +51,10 @@ class CalendarStore {
var events: [CalEvent] = []
var viewType: CalViewType = .month
var currentDate: Date = .now
// The month currently scrolled into view (month view). Lives in the store so
// the Liquid-Glass navigation title read in the system toolbar updates
// via @Observable tracking (a plain @State did not refresh the toolbar).
var visibleMonth: Date = .now
var isLoading = false
var isCachingBackground = false
var lastError: String? = nil