From a3f29aa15b3574a6ed53166f04d62332daebe9fe Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Fri, 5 Jan 2024 19:32:17 +0100 Subject: [PATCH] Add gesture to close the suggested tags --- .../Editor/Components/StatusEditorAutoCompleteView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Packages/Status/Sources/Status/Editor/Components/StatusEditorAutoCompleteView.swift b/Packages/Status/Sources/Status/Editor/Components/StatusEditorAutoCompleteView.swift index ae86db17..03cb6d5a 100644 --- a/Packages/Status/Sources/Status/Editor/Components/StatusEditorAutoCompleteView.swift +++ b/Packages/Status/Sources/Status/Editor/Components/StatusEditorAutoCompleteView.swift @@ -161,5 +161,13 @@ struct StatusEditorAutoCompleteView: View { .padding(.horizontal, .layoutPadding) } .frame(height: 200) + .gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local) + .onEnded({ value in + withAnimation { + if value.translation.height > 0 { + isTagSuggestionExpanded = false + } + } + })) } }