From 27d27681f1d4cb7d862753fa31a50b0f71c7f407 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 24 Oct 2018 07:36:43 +0000 Subject: [PATCH] Restart on theme change --- app/src/main/java/eu/faircode/email/ActivityBase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java index 9006ca72..5c497517 100644 --- a/app/src/main/java/eu/faircode/email/ActivityBase.java +++ b/app/src/main/java/eu/faircode/email/ActivityBase.java @@ -69,8 +69,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc @Override public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { Log.i(Helper.TAG, "Preference " + key + "=" + prefs.getAll().get(key)); - if ("theme".equals(key) || - (!this.getClass().equals(ActivitySetup.class) && ("compact".equals(key) || "debug".equals(key)))) + if ("theme".equals(key)) { + finish(); + startActivity(getIntent()); + } else if (!this.getClass().equals(ActivitySetup.class) && ("compact".equals(key) || "debug".equals(key))) finish(); }