From a588974b72e78f9cd1ff5ec9cb0c4d0ae36a7746 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 20 Jan 2019 17:45:25 +0000 Subject: [PATCH] set the first stored profile as the current one --- .../ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java index 004763a7..7ef511d0 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java @@ -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(); -- 2.39.5