From 2df5a97f4bd9f072d9cc4302e9bf8c07713dea36 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 19:03:26 -0700 Subject: [PATCH] Tab Bar Load Animation Nucleic-Session: EEC60FAE-8368-49CA-9202-7026C12E7F8C Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/Composer.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/Composer.swift b/NucleicRemote/NucleicRemote/Views/Composer.swift index 80171c2..46eb6a4 100644 --- a/NucleicRemote/NucleicRemote/Views/Composer.swift +++ b/NucleicRemote/NucleicRemote/Views/Composer.swift @@ -211,6 +211,20 @@ struct NewChatAffordance: ViewModifier { .padding(.horizontal, 12) .padding(.bottom, 8) .transition(.move(edge: .bottom).combined(with: .opacity)) + // A deliberate swipe down dismisses the bar (drops the keyboard first), + // the gestural twin of tapping the scrim. minimumDistance keeps taps on + // the field / menus / send button working; the vertical-dominant check + // ignores horizontal drags (e.g. moving the text cursor). + .gesture( + DragGesture(minimumDistance: 20) + .onEnded { value in + if value.translation.height > 60, + value.translation.height > abs(value.translation.width) { + draftFocused = false + isPresented = false + } + } + ) } } }