]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix initialization of preferred account name filter in the profile editor when editin...
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 29 Mar 2019 11:30:47 +0000 (13:30 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 29 Mar 2019 11:30:47 +0000 (13:30 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java

index 8ec74734b4e6b71c7ea1d8abdd17929f749045b6..8f3daed46ddb965d59c771210059f1749b3ed453 100644 (file)
@@ -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;
         }