Session View Animation Fix
Nucleic-Session: 34001BF5-66C2-4D6D-844D-EE95727B8D85 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user