From 5f0035b2d0c8fdee064627e4599712294854b831 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Tue, 28 Feb 2023 09:07:20 -0500 Subject: [PATCH] Sort country codes as strings rather than ints. --- .../registration/util/RegistrationNumberInputController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/util/RegistrationNumberInputController.kt b/app/src/main/java/org/thoughtcrime/securesms/registration/util/RegistrationNumberInputController.kt index 9191820557..8521cd7ae4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/registration/util/RegistrationNumberInputController.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/registration/util/RegistrationNumberInputController.kt @@ -30,7 +30,7 @@ class RegistrationNumberInputController( private val spinnerView: MaterialAutoCompleteTextView = countryCodeInputLayout.editText as MaterialAutoCompleteTextView private val supportedCountryPrefixes: List = PhoneNumberUtil.getInstance().supportedCallingCodes .map { CountryPrefix(it, PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(it)) } - .sortedBy { it.digits } + .sortedBy { it.digits.toString() } private val spinnerAdapter: ArrayAdapter = ArrayAdapter(context, R.layout.registration_country_code_dropdown_item, supportedCountryPrefixes) private val countryCodeEntryListener = CountryCodeEntryListener()