diff --git a/NucleicRemote/NucleicRemote/Views/SessionsView.swift b/NucleicRemote/NucleicRemote/Views/SessionsView.swift index 4389191..cd4be2a 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionsView.swift @@ -96,11 +96,13 @@ struct SessionsView: View { } // A notification tap while this tab is already up. .onChange(of: store.pendingRoute) { consumeRoute() } - // Drive the floating tab bar straight off the navigation path: it empties the instant a - // back-swipe/tap begins, so the bar slides back in immediately instead of waiting for - // `SessionDetailView.onDisappear` (which fires only at the end of the pop transition). + // The tab bar's visibility is owned by the session lifecycle (`RemoteStore.open`/ + // `closeOpen`), so it hides/shows no matter which tab a chat opens from. This handler is + // just the responsiveness refinement for *this* tab: the path empties the instant a + // back-swipe/tap begins, so clearing here slides the bar back in immediately instead of + // waiting for `SessionDetailView.onDisappear` (which fires only at the end of the pop). .onChange(of: path) { _, newPath in - store.compactDetailPresented = !newPath.isEmpty + if newPath.isEmpty { store.compactDetailPresented = false } } } }