Tab Bar Animation Fix
Nucleic-Session: 09F787AF-3A70-4978-8762-9827C1CC0774 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -73,9 +73,18 @@ struct SessionsView: View {
|
|||||||
path.append(SessionID(rawValue: raw))
|
path.append(SessionID(rawValue: raw))
|
||||||
}
|
}
|
||||||
consumeRoute()
|
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.
|
// A notification tap while this tab is already up.
|
||||||
.onChange(of: store.pendingRoute) { consumeRoute() }
|
.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 {
|
.toolbar {
|
||||||
ToolbarItem(placement: .topBarTrailing) {
|
ToolbarItem(placement: .topBarTrailing) {
|
||||||
Button {
|
Button {
|
||||||
|
|||||||
Reference in New Issue
Block a user