Improve country selection search

This commit is contained in:
Ilya Laktyushin
2020-08-25 21:06:42 +03:00
parent 615a77b3b6
commit 97c0dbebb9
5 changed files with 134 additions and 34 deletions

View File

@@ -236,6 +236,7 @@ public final class AuthorizationSequenceCountrySelectionController: ViewControll
}
public static func lookupPatternByNumber(_ number: String, preferredCountries: [String: String]) -> String? {
let number = removePlus(number)
if let (_, code) = lookupCountryIdByNumber(number, preferredCountries: preferredCountries), !code.patterns.isEmpty {
var prefixes: [String: String] = [:]
for pattern in code.patterns {