Fix country code sorting in reg v2.

This commit is contained in:
Nicholas Tinsley
2024-05-17 14:58:12 -04:00
committed by Cody Henthorne
parent d88016669b
commit 870aa8e7b0

View File

@@ -32,7 +32,7 @@ class EnterPhoneNumberV2ViewModel : ViewModel() {
val supportedCountryPrefixes: List<CountryPrefix> = PhoneNumberUtil.getInstance().supportedCallingCodes
.map { CountryPrefix(it, PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(it)) }
.sortedBy { it.digits.toString() }
.sortedBy { it.digits }
fun countryPrefix(): CountryPrefix {
return supportedCountryPrefixes[store.value.countryPrefixIndex]