From d553352dddb4776804009f7b7a0bbce250db9bc9 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 13 Dec 2023 11:48:01 +0800 Subject: [PATCH] Disable smart quotes on search bar --- .../Home/Components/BadgeCountHandler.swift | 8 ++++++++ .../App/Views/Home/LibrarySearchView.swift | 1 + .../Views/Profile/SelectBadgeFilterView.swift | 17 +++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 apple/OmnivoreKit/Sources/App/Views/Home/Components/BadgeCountHandler.swift create mode 100644 apple/OmnivoreKit/Sources/App/Views/Profile/SelectBadgeFilterView.swift diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/BadgeCountHandler.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/BadgeCountHandler.swift new file mode 100644 index 000000000..2dd0e276c --- /dev/null +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/BadgeCountHandler.swift @@ -0,0 +1,8 @@ +// +// File.swift +// +// +// Created by Jackson Harper on 12/13/23. +// + +import Foundation diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/LibrarySearchView.swift b/apple/OmnivoreKit/Sources/App/Views/Home/LibrarySearchView.swift index 523867779..d7e768e0a 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/LibrarySearchView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/LibrarySearchView.swift @@ -75,6 +75,7 @@ innerBody }.introspectViewController { controller in searchBar = Introspect.findChild(ofType: UISearchBar.self, in: controller.view) + searchBar?.smartQuotesType = .no } } diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/SelectBadgeFilterView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/SelectBadgeFilterView.swift new file mode 100644 index 000000000..b79656683 --- /dev/null +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/SelectBadgeFilterView.swift @@ -0,0 +1,17 @@ +import Foundation +import SwiftUI + +struct SelectBadgeFilterView: View { + @ObservedObject var viewModel: FiltersViewModel + + var body: some View { + List { + ForEach(viewModel.libraryFilters) { filter in + HStack { + Text(filter.name) + Spacer() + } + } + } + } +}