Fix search in filter by labels view

This commit is contained in:
Jackson Harper
2023-01-20 16:26:49 +08:00
parent 8f6b2663c4
commit 1d79690f0d
2 changed files with 1 additions and 54 deletions

View File

@ -1,53 +0,0 @@
import SwiftUI
import Views
// TODO: maybe move this into Views package?
// struct IconButtonView: View {
// let title: String
// let systemIconName: String
// let action: () -> Void
//
// var body: some View {
// Button(action: action) {
// VStack(alignment: .center, spacing: 8) {
// Image(systemName: systemIconName)
// .font(.appTitle)
// .foregroundColor(.appYellow48)
// Text(title)
// .font(.appBody)
// .foregroundColor(.appGrayText)
// }
// .frame(
// maxWidth: .infinity,
// maxHeight: .infinity
// )
// .background(Color.appButtonBackground)
// .cornerRadius(8)
// }
// .frame(height: 100)
// }
// }
struct CheckmarkButtonView: View {
let titleText: String
let isSelected: Bool
let action: () -> Void
var body: some View {
Button(
action: action,
label: {
HStack {
Text(titleText)
Spacer()
if isSelected {
Image(systemName: "checkmark")
.foregroundColor(.appYellow48)
}
}
.padding(.vertical, 8)
}
)
.buttonStyle(RectButtonStyle())
}
}

View File

@ -22,7 +22,7 @@ struct FilterByLabelsView: View {
var innerBody: some View {
List {
ForEach(viewModel.labels, id: \.self) { label in
ForEach(viewModel.labels.applySearchFilter(viewModel.labelSearchFilter), id: \.self) { label in
HStack {
TextChip(feedItemLabel: label, negated: isNegated(label))
Spacer()