From: Damyan Ivanov Date: Mon, 11 Mar 2019 18:32:07 +0000 (+0200) Subject: call setupProfile in onCreate, not in onResume X-Git-Tag: v0.8~20 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=831ffd898c61c728d860f908e1dec288ae4060a3;p=mobile-ledger.git call setupProfile in onCreate, not in onResume onResume is also called when the app is brought to the front and there is no need to refresh profile data at this time --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index ecd78167..64a30812 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -115,6 +115,8 @@ public class MainActivity extends ProfileThemedActivity { setContentView(R.layout.activity_main); + setupProfile(); + fab = findViewById(R.id.btn_add_transaction); profileListContainer = findViewById(R.id.nav_profile_list_container); profileListHeadArrow = findViewById(R.id.nav_profiles_arrow); @@ -291,11 +293,6 @@ public class MainActivity extends ProfileThemedActivity { intent.putExtra(BUNDLE_SAVED_STATE, bundle); startActivity(intent); } - @Override - protected void onResume() { - super.onResume(); - setupProfile(); - } public void startEditProfileActivity(MobileLedgerProfile profile) { Intent intent = new Intent(this, ProfileDetailActivity.class); Bundle args = new Bundle();