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 {
@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<List<EntityAccount>>() {
@Override
public void onChanged(@Nullable List<EntityAccount> 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();


Loading…
Cancel
Save