mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-24 05:04:50 -04:00
Merge pull request #1622 from kiwix/feature/macgills/1620-read-aloud-enforced-language
#1620 "Read aloud" seems completly broken with `develop` branch
This commit is contained in:
commit
1a918fdff1
@ -59,7 +59,9 @@ class CustomMainActivity : CoreMainActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
requireEnforcedLanguage()
|
||||
if (enforcedLanguage()) {
|
||||
return
|
||||
}
|
||||
openObbOrZim()
|
||||
}
|
||||
|
||||
@ -112,7 +114,7 @@ class CustomMainActivity : CoreMainActivity() {
|
||||
|
||||
override fun getIconResId() = R.mipmap.ic_launcher
|
||||
|
||||
private fun requireEnforcedLanguage(): Boolean {
|
||||
private fun enforcedLanguage(): Boolean {
|
||||
val currentLocaleCode = Locale.getDefault().toString()
|
||||
if (BuildConfig.ENFORCED_LANG.isNotEmpty() && BuildConfig.ENFORCED_LANG != currentLocaleCode) {
|
||||
LanguageUtils.handleLocaleChange(this, BuildConfig.ENFORCED_LANG)
|
||||
|
Loading…
x
Reference in New Issue
Block a user