diff --git a/NucleicRemote/NucleicRemote/Views/SessionsView.swift b/NucleicRemote/NucleicRemote/Views/SessionsView.swift index 5fc3328..45c70ab 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionsView.swift @@ -73,9 +73,18 @@ struct SessionsView: View { path.append(SessionID(rawValue: raw)) } consumeRoute() + // Sync the shell's tab-bar visibility to the current push depth on (re)appear — + // `onChange` alone won't fire for a path restored across a remount. + store.compactDetailPresented = !path.isEmpty } // 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). + .onChange(of: path) { _, newPath in + store.compactDetailPresented = !newPath.isEmpty + } .toolbar { ToolbarItem(placement: .topBarTrailing) { Button {