mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-18 20:04:11 +00:00
fix language override
This commit is contained in:
parent
5629020d0e
commit
94180ed6bd
3 changed files with 4 additions and 4 deletions
|
|
@ -24,7 +24,7 @@
|
|||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:replace="android:name"
|
||||
tools:replace="android:name"
|
||||
android:fullBackupContent="@xml/backup_descriptor">
|
||||
<activity
|
||||
android:name=".ui.activities.MainActivity"
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
<item>Türk</item>
|
||||
<item>中文(简体)</item>
|
||||
<item>中文(正體)</item>
|
||||
<item>한국어</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="LanguageValues">
|
||||
|
|
@ -99,6 +100,7 @@
|
|||
<item>tr</item>
|
||||
<item>zh</item>
|
||||
<item>zh_TW</item>
|
||||
<item>ko</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -175,8 +175,6 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
|
||||
@SuppressLint("ObsoleteSdkInt")
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
val languageHelper = LanguageHelper(sharedPreferences.getString("language", "en"))
|
||||
Locale.setDefault(languageHelper.locale)
|
||||
|
|
@ -190,7 +188,7 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
@Suppress("Deprecation")
|
||||
resources.updateConfiguration(configuration,
|
||||
resources.displayMetrics)
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
if (!HabiticaBaseApplication.checkUserAuthentication(this, hostConfig)) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue