Various improvements

This commit is contained in:
Ilya Laktyushin
2023-10-15 17:07:39 +04:00
parent 4013fca50e
commit 9f7056670c
41 changed files with 2195 additions and 261 deletions

View File

@@ -60,7 +60,7 @@ private func loadCountryCodes() -> [(String, Int)] {
private let countryCodes: [(String, Int)] = loadCountryCodes()
func localizedCountryNamesAndCodes(strings: PresentationStrings) -> [((String, String), String, [Int])] {
public func localizedCountryNamesAndCodes(strings: PresentationStrings) -> [((String, String), String, [Int])] {
let locale = localeWithStrings(strings)
var result: [((String, String), String, [Int])] = []
for country in AuthorizationSequenceCountrySelectionController.countries() {
@@ -159,7 +159,7 @@ private func matchStringTokens(_ tokens: [Data], with other: [Data]) -> Bool {
return false
}
private func searchCountries(items: [((String, String), String, [Int])], query: String) -> [((String, String), String, Int)] {
public func searchCountries(items: [((String, String), String, [Int])], query: String) -> [((String, String), String, Int)] {
let queryTokens = stringTokens(query.lowercased())
var result: [((String, String), String, Int)] = []