From 4ab078bd183455c74d632b47b04a65547d0b7417 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sat, 30 Dec 2023 14:09:07 +0000 Subject: [PATCH] ios: show clear search button when search is not empty (#3627) --- apps/ios/Shared/Views/ChatList/ChatListView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 3d0551de6..62955a104 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -289,16 +289,16 @@ struct ChatListSearchBar: View { HStack(spacing: 4) { Image(systemName: "magnifyingglass") TextField("Search or paste SimpleX link", text: $searchText) + .foregroundColor(searchShowingSimplexLink ? .secondary : .primary) .disabled(searchShowingSimplexLink) .focused($searchFocussed) .frame(maxWidth: .infinity) - if searchFocussed || searchShowingSimplexLink { + if !searchText.isEmpty { Image(systemName: "xmark.circle.fill") - .opacity(searchText == "" ? 0 : 1) .onTapGesture { searchText = "" } - } else if searchText == "" { + } else if !searchFocussed { HStack(spacing: 24) { if m.pasteboardHasStrings { Image(systemName: "doc")