Fix: Switch theme is not fully taken into account without restarting the app

This commit is contained in:
Benoit Marty 2020-05-28 23:03:04 +02:00
parent 7be3434136
commit 86c9264ed9
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ Improvements 🙌:
-
Bugfix 🐛:
-
- Switch theme is not fully taken into account without restarting the app
Translations 🗣:
-

View file

@ -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