From: Damyan Ivanov Date: Sun, 20 Jan 2019 17:45:25 +0000 (+0000) Subject: set the first stored profile as the current one X-Git-Tag: v0.3~10 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=a588974b72e78f9cd1ff5ec9cb0c4d0ae36a7746;p=mobile-ledger.git set the first stored profile as the current one --- 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();