From 7b6a1ed2e769eecfba29ac5bb3b35701cd0bbd2e Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 14 May 2020 12:28:56 +0200 Subject: [PATCH] Follow system locale Setting is not ready, so riot was choosing and persisting the locale during initial setup. For debugging purposes, it is useful to be able to change the language without wiping data, too. --- .../main/java/im/vector/riotx/features/settings/VectorLocale.kt | 2 +- vector/src/main/res/xml/vector_settings_preferences.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/riotx/features/settings/VectorLocale.kt b/vector/src/main/java/im/vector/riotx/features/settings/VectorLocale.kt index e1a89ab3c4..13e0292ea6 100644 --- a/vector/src/main/java/im/vector/riotx/features/settings/VectorLocale.kt +++ b/vector/src/main/java/im/vector/riotx/features/settings/VectorLocale.kt @@ -58,7 +58,7 @@ object VectorLocale { fun init(context: Context) { val preferences = PreferenceManager.getDefaultSharedPreferences(context) - if (preferences.contains(APPLICATION_LOCALE_LANGUAGE_KEY)) { + if (false && preferences.contains(APPLICATION_LOCALE_LANGUAGE_KEY)) { applicationLocale = Locale(preferences.getString(APPLICATION_LOCALE_LANGUAGE_KEY, "")!!, preferences.getString(APPLICATION_LOCALE_COUNTRY_KEY, "")!!, preferences.getString(APPLICATION_LOCALE_VARIANT_KEY, "")!! diff --git a/vector/src/main/res/xml/vector_settings_preferences.xml b/vector/src/main/res/xml/vector_settings_preferences.xml index e7217b7394..47a344d452 100644 --- a/vector/src/main/res/xml/vector_settings_preferences.xml +++ b/vector/src/main/res/xml/vector_settings_preferences.xml @@ -9,6 +9,7 @@