Is there a way to get notified when the .navigationBarTitleDisplayMode (which is set to .automatic) of a view changes from .large to .inline or vice versa?
Something like an @Environment object similar to
@Environment(\.locale) var locale: Locale
Depending on the displayMode, I'd like to show a different title.
Something along the lines of:
@Environment(\.navigationBarTitleDisplayMode) var mode: NavigationBarTitleDisplayMode
...
.navigationBarTitle(mode == .large ? "I am the large title" : "Inline title")
.navigationBarTitleDisplayMode(.automatic)