From e0c30308924e8c71ef910bbcaa11c25b3b715084 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 30 Oct 2018 13:47:10 +0000 Subject: [PATCH] Small improvement --- app/src/main/java/eu/faircode/email/ActivityMain.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityMain.java b/app/src/main/java/eu/faircode/email/ActivityMain.java index 03ad8881..271982f1 100644 --- a/app/src/main/java/eu/faircode/email/ActivityMain.java +++ b/app/src/main/java/eu/faircode/email/ActivityMain.java @@ -36,8 +36,6 @@ import androidx.lifecycle.Observer; public class ActivityMain extends AppCompatActivity implements FragmentManager.OnBackStackChangedListener, SharedPreferences.OnSharedPreferenceChangeListener { @Override protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getSupportFragmentManager().addOnBackStackChangedListener(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); @@ -49,6 +47,7 @@ public class ActivityMain extends AppCompatActivity implements FragmentManager.O } if (prefs.getBoolean("eula", false)) { + super.onCreate(savedInstanceState); DB.getInstance(this).account().liveAccounts(true).observe(this, new Observer>() { @Override public void onChanged(@Nullable List accounts) { @@ -63,6 +62,7 @@ public class ActivityMain extends AppCompatActivity implements FragmentManager.O }); } else { setTheme(R.style.AppThemeLight); + super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();