Fix default language being broken

This commit is contained in:
Matthieu 2020-12-16 17:27:29 +01:00
parent 2256691cd1
commit 969ec214fa
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ open class BaseActivity : AppCompatActivity() {
}
private fun updateBaseContextLocale(context: Context): Context {
val language = PreferenceManager.getDefaultSharedPreferences(context).getString("language", "").orEmpty()
if(language.isEmpty()){
val language = PreferenceManager.getDefaultSharedPreferences(context).getString("language", "default") ?: "default"
if(language == "default"){
return context
}
val locale = Locale.forLanguageTag(language)