]> git.ktnx.net Git - mobile-ledger.git/commitdiff
set the first stored profile as the current one
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 20 Jan 2019 17:45:25 +0000 (17:45 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 20 Jan 2019 17:45:25 +0000 (17:45 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java

index 004763a7ac87a45343018d67b095872aa612efc6..7ef511d00656c2badc098dcedec3ba21a78b1a52 100644 (file)
@@ -145,6 +145,9 @@ public class ProfileDetailFragment extends Fragment {
                 mProfile.storeInDB();
                 Data.profiles.add(mProfile);
                 MobileLedgerProfile.storeProfilesOrder();
+
+                // first profile ever?
+                if (Data.profiles.getList().size() == 1) Data.profile.set(mProfile);
             }
 
             Activity activity = getActivity();