mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-06-07 14:28:50 +00:00
Dismiss tag on select
This commit is contained in:
parent
f428118fa0
commit
d94e816d63
1 changed files with 4 additions and 1 deletions
|
@ -80,7 +80,10 @@ struct StatusEditorAutoCompleteView: View {
|
||||||
private var suggestionsTagView: some View {
|
private var suggestionsTagView: some View {
|
||||||
ForEach(viewModel.tagsSuggestions) { tag in
|
ForEach(viewModel.tagsSuggestions) { tag in
|
||||||
Button {
|
Button {
|
||||||
viewModel.selectHashtagSuggestion(tag: tag.name)
|
withAnimation {
|
||||||
|
isTagSuggestionExpanded = false
|
||||||
|
viewModel.selectHashtagSuggestion(tag: tag.name)
|
||||||
|
}
|
||||||
if let index = recentTags.firstIndex(where: { $0.title.lowercased() == tag.name.lowercased() }) {
|
if let index = recentTags.firstIndex(where: { $0.title.lowercased() == tag.name.lowercased() }) {
|
||||||
recentTags[index].lastUse = Date()
|
recentTags[index].lastUse = Date()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue