Browse Source

Small improvement

main
M66B 6 years ago
parent
commit
e0c3030892
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/src/main/java/eu/faircode/email/ActivityMain.java

+ 2
- 2
app/src/main/java/eu/faircode/email/ActivityMain.java View File

@ -36,8 +36,6 @@ import androidx.lifecycle.Observer;
public class ActivityMain extends AppCompatActivity implements FragmentManager.OnBackStackChangedListener, SharedPreferences.OnSharedPreferenceChangeListener { public class ActivityMain extends AppCompatActivity implements FragmentManager.OnBackStackChangedListener, SharedPreferences.OnSharedPreferenceChangeListener {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportFragmentManager().addOnBackStackChangedListener(this); getSupportFragmentManager().addOnBackStackChangedListener(this);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
@ -49,6 +47,7 @@ public class ActivityMain extends AppCompatActivity implements FragmentManager.O
} }
if (prefs.getBoolean("eula", false)) { if (prefs.getBoolean("eula", false)) {
super.onCreate(savedInstanceState);
DB.getInstance(this).account().liveAccounts(true).observe(this, new Observer<List<EntityAccount>>() { DB.getInstance(this).account().liveAccounts(true).observe(this, new Observer<List<EntityAccount>>() {
@Override @Override
public void onChanged(@Nullable List<EntityAccount> accounts) { public void onChanged(@Nullable List<EntityAccount> accounts) {
@ -63,6 +62,7 @@ public class ActivityMain extends AppCompatActivity implements FragmentManager.O
}); });
} else { } else {
setTheme(R.style.AppThemeLight); setTheme(R.style.AppThemeLight);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();


Loading…
Cancel
Save