mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 12:49:53 +00:00
ios: show clear search button when search is not empty (#3627)
This commit is contained in:
parent
644169b835
commit
4ab078bd18
1 changed files with 3 additions and 3 deletions
|
@ -289,16 +289,16 @@ struct ChatListSearchBar: View {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: "magnifyingglass")
|
Image(systemName: "magnifyingglass")
|
||||||
TextField("Search or paste SimpleX link", text: $searchText)
|
TextField("Search or paste SimpleX link", text: $searchText)
|
||||||
|
.foregroundColor(searchShowingSimplexLink ? .secondary : .primary)
|
||||||
.disabled(searchShowingSimplexLink)
|
.disabled(searchShowingSimplexLink)
|
||||||
.focused($searchFocussed)
|
.focused($searchFocussed)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
if searchFocussed || searchShowingSimplexLink {
|
if !searchText.isEmpty {
|
||||||
Image(systemName: "xmark.circle.fill")
|
Image(systemName: "xmark.circle.fill")
|
||||||
.opacity(searchText == "" ? 0 : 1)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
searchText = ""
|
searchText = ""
|
||||||
}
|
}
|
||||||
} else if searchText == "" {
|
} else if !searchFocussed {
|
||||||
HStack(spacing: 24) {
|
HStack(spacing: 24) {
|
||||||
if m.pasteboardHasStrings {
|
if m.pasteboardHasStrings {
|
||||||
Image(systemName: "doc")
|
Image(systemName: "doc")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue