Tab Bar Animation Fix
Nucleic-Session: 09F787AF-3A70-4978-8762-9827C1CC0774 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -46,10 +46,13 @@ struct CompactRootView: View {
|
|||||||
@State private var barHeight: CGFloat = 72
|
@State private var barHeight: CGFloat = 72
|
||||||
|
|
||||||
/// The bar owns the bottom edge on the top-level tabs, but yields it to a pushed session's
|
/// The bar owns the bottom edge on the top-level tabs, but yields it to a pushed session's
|
||||||
/// floating glass chat bar (`openSessionID`, set by `SessionDetailView`'s appear/disappear) and
|
/// floating glass chat bar (`compactDetailPresented`, driven by `SessionsView`'s navigation
|
||||||
/// to the new-chat composer while it's up (`showNewChat`) — both slide it out, so the composer
|
/// path) and to the new-chat composer while it's up (`showNewChat`) — both slide it out, so the
|
||||||
/// doesn't just stack on top of a lingering tab bar.
|
/// composer doesn't just stack on top of a lingering tab bar. We key off the path rather than
|
||||||
private var showsTabBar: Bool { store.openSessionID == nil && !showNewChat }
|
/// `openSessionID` because the path flips the instant a back-swipe begins, whereas
|
||||||
|
/// `openSessionID` isn't cleared until the detail's `onDisappear` fires at the *end* of the pop
|
||||||
|
/// transition — which left the bar sliding back up 1–2s late.
|
||||||
|
private var showsTabBar: Bool { !store.compactDetailPresented && !showNewChat }
|
||||||
|
|
||||||
/// The "+" is inert without control scope or a project to start in, so it's shown only when a
|
/// The "+" is inert without control scope or a project to start in, so it's shown only when a
|
||||||
/// chat could actually be kicked off (mirrors `NewChatAffordance.canStart`).
|
/// chat could actually be kicked off (mirrors `NewChatAffordance.canStart`).
|
||||||
|
|||||||
Reference in New Issue
Block a user