From 02d4b1897e93f34ee89dfe391f0e379999cfa5ba Mon Sep 17 00:00:00 2001 From: Michelle Tang Date: Tue, 11 Feb 2025 14:10:51 -0500 Subject: [PATCH] Allow searching with + prefix. --- .../registration/ui/countrycode/CountryCodeViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/ui/countrycode/CountryCodeViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/registration/ui/countrycode/CountryCodeViewModel.kt index 64132d8802..2025dc609d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/registration/ui/countrycode/CountryCodeViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/registration/ui/countrycode/CountryCodeViewModel.kt @@ -35,7 +35,7 @@ class CountryCodeViewModel : ViewModel() { query = filterBy, filteredList = state.value.countryList.filter { country: Country -> country.name.contains(filterBy, ignoreCase = true) || - country.countryCode.toString().contains(filterBy) || + country.countryCode.toString().contains(filterBy.removePrefix("+")) || (filterBy.equals("usa", ignoreCase = true) && country.name.equals("United States", ignoreCase = true)) } )