From 6c20c6aeaea472261a6959cbd468dd069b071d7e Mon Sep 17 00:00:00 2001 From: Nick Bradbury Date: Fri, 20 Dec 2024 07:40:04 -0500 Subject: [PATCH] Simplify splitting language display name and code --- .../main/java/org/wordpress/android/util/LocaleManager.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/util/LocaleManager.kt b/WordPress/src/main/java/org/wordpress/android/util/LocaleManager.kt index 21dd06286d0f..ff1c1534e89d 100644 --- a/WordPress/src/main/java/org/wordpress/android/util/LocaleManager.kt +++ b/WordPress/src/main/java/org/wordpress/android/util/LocaleManager.kt @@ -152,10 +152,7 @@ object LocaleManager { for (i in entryStrings.indices) { // now, we can split the sorted array to extract the display string and the language code - val split = entryStrings[i] - .split("__".toRegex()) - .dropLastWhile { it.isEmpty() } - .toTypedArray() + val split = entryStrings[i].split("__") sortedEntries[i] = split[0] sortedValues[i] = split[1] detailStrings[i] =