move setupProfile from onCreate to onStart
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 12 Mar 2019 20:08:14 +0000 (22:08 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 Mar 2019 20:54:57 +0000 (22:54 +0200)
it needs toe activity to be filly up

app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index 64a3081..1376e7a 100644 (file)
@@ -91,6 +91,8 @@ public class MainActivity extends ProfileThemedActivity {
     protected void onStart() {
         super.onStart();
 
+        setupProfile();
+
         updateLastUpdateTextFromDB();
         Date lastUpdate = Data.lastUpdateDate.get();
 
@@ -115,8 +117,6 @@ 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);