From 8e388085aade7f5a1ef616e61bf5b026dfe94411 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 5 May 2019 18:22:49 +0300 Subject: [PATCH] notify the profile list adapter when a profile is changed was broken after migration of the profile list to LiveData --- .../ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java | 4 ++++ 1 file changed, 4 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 c0944f9a..b51ddbb5 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 @@ -146,6 +146,10 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue final ArrayList profiles = Data.profiles.getValue(); if (profiles == null) throw new AssertionError(); profiles.set(index, newProfile); + + ProfilesRecyclerViewAdapter prva = ProfilesRecyclerViewAdapter.getInstance(); + if (prva != null) prva.notifyItemChanged(index); + if (mProfile.equals(Data.profile.getValue())) Data.profile.setValue(newProfile); } @Override -- 2.39.5