mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-03-14 09:45:42 +00:00
reset search when preset are pressed
This commit is contained in:
parent
a4eb7d06fe
commit
3a82a558ee
1 changed files with 4 additions and 2 deletions
|
@ -564,7 +564,7 @@ struct ChatListSearchBar: View {
|
|||
|
||||
var body: some View {
|
||||
VStack(spacing: 12) {
|
||||
ScrollView([.horizontal], showsIndicators: false) { ChatTagsView(parentSheet: $parentSheet) }
|
||||
ScrollView([.horizontal], showsIndicators: false) { ChatTagsView(parentSheet: $parentSheet, searchText: $searchText) }
|
||||
HStack(spacing: 12) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "magnifyingglass")
|
||||
|
@ -671,6 +671,7 @@ struct ChatTagsView: View {
|
|||
@EnvironmentObject var chatModel: ChatModel
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
@Binding var parentSheet: SomeSheet<AnyView>?
|
||||
@Binding var searchText: String
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
|
@ -791,9 +792,10 @@ struct ChatTagsView: View {
|
|||
nil
|
||||
}
|
||||
Menu {
|
||||
if selectedPresetTag != nil {
|
||||
if chatTagsModel.activeFilter != nil || !searchText.isEmpty {
|
||||
Button {
|
||||
chatTagsModel.activeFilter = nil
|
||||
searchText = ""
|
||||
} label: {
|
||||
HStack {
|
||||
Image(systemName: "list.bullet")
|
||||
|
|
Loading…
Add table
Reference in a new issue