mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Merge pull request #1420 from vector-im/feature/fix_theme_switch
Fix: Switch theme is not fully taken into account without restarting the app
This commit is contained in:
commit
4a7bba047b
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ Improvements 🙌:
|
|||
-
|
||||
|
||||
Bugfix 🐛:
|
||||
-
|
||||
- Switch theme is not fully taken into account without restarting the app
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
|
|
@ -54,7 +54,7 @@ class VectorSettingsPreferencesFragment @Inject constructor(
|
|||
findPreference<VectorListPreference>(ThemeUtils.APPLICATION_THEME_KEY)!!
|
||||
.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue ->
|
||||
if (newValue is String) {
|
||||
ThemeUtils.setApplicationTheme(requireContext(), newValue)
|
||||
ThemeUtils.setApplicationTheme(requireContext().applicationContext, newValue)
|
||||
// Restart the Activity
|
||||
activity?.restart()
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue