From 3699284937e8abb641fc19a4be2bda60e197ab64 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 29 Mar 2019 13:30:47 +0200 Subject: [PATCH] fix initialization of preferred account name filter in the profile editor when editing new profile --- .../ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 8ec74734..8f3daed4 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 @@ -211,7 +211,6 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue if (isChecked) userName.requestFocus(); }); - preferredAccountsFilter.setText(mProfile.getPreferredAccountsFilter()); postingPermitted.setOnCheckedChangeListener(((buttonView, isChecked) -> { preferredAccountsFilterLayout.setVisibility(isChecked ? View.VISIBLE : View.GONE); })); @@ -230,6 +229,7 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue authParams.setVisibility(mProfile.isAuthEnabled() ? View.VISIBLE : View.GONE); userName.setText(mProfile.isAuthEnabled() ? mProfile.getAuthUserName() : ""); password.setText(mProfile.isAuthEnabled() ? mProfile.getAuthPassword() : ""); + preferredAccountsFilter.setText(mProfile.getPreferredAccountsFilter()); profileThemeId = mProfile.getThemeId(); } else { @@ -240,6 +240,7 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue authParams.setVisibility(View.GONE); userName.setText(""); password.setText(""); + preferredAccountsFilter.setText(null); profileThemeId = -1; } -- 2.39.5