From: Damyan Ivanov Date: Fri, 29 Mar 2019 11:30:47 +0000 (+0200) Subject: fix initialization of preferred account name filter in the profile editor when editin... X-Git-Tag: v0.9~39 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=3699284937e8abb641fc19a4be2bda60e197ab64;p=mobile-ledger.git fix initialization of preferred account name filter in the profile editor when editing new profile --- 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; }