Bottom Tab Bar Visibility Adjustment
Nucleic-Session: 747527BF-AEE9-4939-BE70-A14F1F3BBBA8 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -190,10 +190,16 @@ struct NewChatAffordance: ViewModifier {
|
||||
.ignoresSafeArea()
|
||||
.transition(.opacity)
|
||||
// Tapping away drops the keyboard; with nothing typed there's nothing to
|
||||
// keep the bar around for, so close it. A draft in progress stays open
|
||||
// (keyboard down) so a stray tap doesn't discard it.
|
||||
// keep the bar around for, so close it too. A draft in progress stays
|
||||
// open (keyboard down) so a stray tap doesn't discard it — a second tap
|
||||
// (keyboard already down) then closes it.
|
||||
.onTapGesture {
|
||||
if isEmpty { isPresented = false } else { draftFocused = false }
|
||||
if draftFocused {
|
||||
draftFocused = false
|
||||
if isEmpty { isPresented = false }
|
||||
} else {
|
||||
isPresented = false
|
||||
}
|
||||
}
|
||||
StartChatComposer(draft: $draft, focus: $draftFocused,
|
||||
onStart: { isPresented = false }, lockedProject: project)
|
||||
|
||||
Reference in New Issue
Block a user