mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
use getLocales() for Android >= Nougat
This commit is contained in:
parent
982dc38b00
commit
333868ed22
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue