diff --git a/NucleicRemote/NucleicRemote/Views/Composer.swift b/NucleicRemote/NucleicRemote/Views/Composer.swift index 9351bce..80171c2 100644 --- a/NucleicRemote/NucleicRemote/Views/Composer.swift +++ b/NucleicRemote/NucleicRemote/Views/Composer.swift @@ -235,9 +235,17 @@ struct NewChatAffordance: ViewModifier { extension View { /// Add the floating "+" start-chat affordance (glass circle → glass composer sheet). See /// `NewChatAffordance`. + /// `enabled: false` drops the affordance entirely — the compact shell hosts a single shared "+" + /// beside its tab bar, so the per-page discs (Home, a project page) apply this only at regular + /// width, where there's no tab bar to carry it. + @ViewBuilder func newChatAffordance(project: WireProject? = nil, isPresented: Binding, - showsButton: Bool = true) -> some View { - modifier(NewChatAffordance(project: project, isPresented: isPresented, showsButton: showsButton)) + showsButton: Bool = true, enabled: Bool = true) -> some View { + if enabled { + modifier(NewChatAffordance(project: project, isPresented: isPresented, showsButton: showsButton)) + } else { + self + } } }