mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
fix the region detector
This commit is contained in:
parent
1049669cb8
commit
ab8422d8e8
@ -21,7 +21,7 @@ object LocaleHelper {
|
||||
)
|
||||
updateLocaleConf(context, locale)
|
||||
} else {
|
||||
val locale = Locale(languageName.toString())
|
||||
val locale = Locale(languageName)
|
||||
updateLocaleConf(context, locale)
|
||||
}
|
||||
}
|
||||
@ -41,15 +41,15 @@ object LocaleHelper {
|
||||
|
||||
fun getDetectedCountry(context: Context, defaultCountryIsoCode: String): String {
|
||||
detectSIMCountry(context)?.let {
|
||||
return it
|
||||
if (it != "") return it
|
||||
}
|
||||
|
||||
detectNetworkCountry(context)?.let {
|
||||
return it
|
||||
if (it != "") return it
|
||||
}
|
||||
|
||||
detectLocaleCountry(context)?.let {
|
||||
return it
|
||||
if (it != "") return it
|
||||
}
|
||||
|
||||
return defaultCountryIsoCode
|
||||
|
Loading…
Reference in New Issue
Block a user