1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-23 16:25:30 +00:00

Small improvement

This commit is contained in:
M66B 2018-10-30 13:47:10 +00:00
parent dc8c93ea27
commit e0c3030892

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();