Sort country codes as strings rather than ints.

main
Nicholas 2023-02-28 09:07:20 -05:00 zatwierdzone przez GitHub
rodzic a20d5fd6cf
commit 5f0035b2d0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -30,7 +30,7 @@ class RegistrationNumberInputController(
private val spinnerView: MaterialAutoCompleteTextView = countryCodeInputLayout.editText as MaterialAutoCompleteTextView
private val supportedCountryPrefixes: List<CountryPrefix> = PhoneNumberUtil.getInstance().supportedCallingCodes
.map { CountryPrefix(it, PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(it)) }
.sortedBy { it.digits }
.sortedBy { it.digits.toString() }
private val spinnerAdapter: ArrayAdapter<CountryPrefix> = ArrayAdapter<CountryPrefix>(context, R.layout.registration_country_code_dropdown_item, supportedCountryPrefixes)
private val countryCodeEntryListener = CountryCodeEntryListener()