# HG changeset patch # User Dennis Concepción Martín # Date 1627043924 -3600 # Node ID e521236028e09eaea9793e2f202bf37cad76d60e # Parent f76d0e26c178673fe3cf68cddf79e751003c17e4 Remove OK button diff -r f76d0e26c178 -r e521236028e0 Simoleon/Helpers/CurrencySelector.swift --- a/Simoleon/Helpers/CurrencySelector.swift Fri Jul 23 13:19:28 2021 +0100 +++ b/Simoleon/Helpers/CurrencySelector.swift Fri Jul 23 13:38:44 2021 +0100 @@ -14,23 +14,12 @@ @EnvironmentObject var subscriptionController: SubscriptionController @State private var searchCurrency = "" - @State private var searching = false @State private var showingSubscriptionPaywall = false var body: some View { NavigationView { Form { - TextField("Search ...", text: $searchCurrency) { startedEditing in - if startedEditing { - withAnimation { - searching = true - } - } - } onCommit: { - withAnimation { - searching = false - } - } + TextField("Search ...", text: $searchCurrency) Section(header: Text("All currencies", comment: "Section header in currency selector")) { ForEach(currencyPairs(), id: \.self) { currencyPair in @@ -43,7 +32,6 @@ .gesture(DragGesture() .onChanged({ _ in UIApplication.shared.dismissKeyboard() - searching = false }) ) .navigationTitle(Text("Currencies", comment: "Navigation title")) @@ -54,19 +42,6 @@ Text("Cancel", comment: "Button to dismiss currency selector") } } - - ToolbarItem(placement: .confirmationAction) { - if searching { - Button(action: { withAnimation { - searchCurrency = "" - searching = false - UIApplication.shared.dismissKeyboard() - }} - ) { - Text("Ok", comment: "Button to stop searching in currency selector") - } - } - } } } .sheet(isPresented: $showingSubscriptionPaywall) {