Skip to content

Commit

Permalink
Merge pull request #441 from WildAid/415-remove-micro-image
Browse files Browse the repository at this point in the history
Remove micro image #416
  • Loading branch information
Sheeri committed May 10, 2022
2 parents f7502eb + 8244964 commit 57013c4
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions o-fish-ios/Views/Components/Picker/SearchBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,7 @@ struct SearchBarView: View {
onCommit: onCommit)
.font(.body)

if searchText.isEmpty {
Button(action: {
//TODO: use microphone to input search string
print("Microphone button tapped")
}) {
Image(systemName: "mic.fill")
}
.alert(isPresented: $showingAlert) {
Alert(title: Text("Error"), message: Text("\(errorText)"), dismissButton: .default(Text("Ok")))
}
} else {
if !searchText.isEmpty {
Button(action: {
self.searchText = ""
self.clickedDelete()
Expand All @@ -55,12 +45,15 @@ struct SearchBarView: View {
}
}
}
.padding(EdgeInsets(top: Dimension.inset, leading: Dimension.bottomInset, bottom: Dimension.inset, trailing: Dimension.inset))
.frame(height: Dimension.heightTextField)
.foregroundColor(.secondary)
.background(Color.oSearchBar)
.cornerRadius(Dimension.cornerRadius)
.padding([.horizontal, .top], Dimension.padding)
.alert(isPresented: $showingAlert) {
Alert(title: Text("Error"), message: Text("\(errorText)"), dismissButton: .default(Text("Ok")))
}
.padding(EdgeInsets(top: Dimension.inset, leading: Dimension.bottomInset, bottom: Dimension.inset, trailing: Dimension.inset))
.frame(height: Dimension.heightTextField)
.foregroundColor(.secondary)
.background(Color.oSearchBar)
.cornerRadius(Dimension.cornerRadius)
.padding([.horizontal, .top], Dimension.padding)

Divider()
.frame(height: 1.0)
Expand Down

0 comments on commit 57013c4

Please sign in to comment.