From: Damyan Ivanov Date: Sun, 5 May 2019 13:42:55 +0000 (+0300) Subject: finish the profile editor activity when the profile is removed X-Git-Tag: v0.10.0~17 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=009c99ccf74f20d9ba1a7804eefe766ede0c020e;p=mobile-ledger.git finish the profile editor activity when the profile is removed it was done only when the current profile is removed --- 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 4f9573b0..470a3eae 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 @@ -116,9 +116,10 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue if (mProfile.equals(Data.profile.getValue())) { debug("profiles", "[fragment] setting current profile to 0"); Data.setCurrentProfile(newList.get(0)); - final FragmentActivity activity = getActivity(); - if (activity != null) activity.finish(); } + + final FragmentActivity activity = getActivity(); + if (activity != null) activity.finish(); }); builder.show(); return false;