From 333868ed22ec97bf350001e1614b73624c0ddfd8 Mon Sep 17 00:00:00 2001 From: IndusAryan Date: Sat, 9 Dec 2023 19:38:30 +0530 Subject: [PATCH] use getLocales() for Android >= Nougat --- .../com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt index adbc6f14..ec61edf5 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt @@ -49,7 +49,7 @@ fun getCurrentLocale(context: Context): String { val conf = res.configuration return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - conf?.locales?.toString() ?: "en" + conf?.locales?.get(0)?.toString() ?: "en" } else { @Suppress("DEPRECATION") conf?.locale?.toString() ?: "en"