]> git.ktnx.net Git - mobile-ledger.git/commitdiff
finish the profile editor activity when the profile is removed
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 May 2019 13:42:55 +0000 (16:42 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 May 2019 13:42:55 +0000 (16:42 +0300)
it was done only when the current profile is removed

app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java

index 4f9573b0c55895056149822f773d3cac9d5f27c9..470a3eaee682e99ae0c436e28466059ef90f207e 100644 (file)
@@ -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;