builder.setPositiveButton(R.string.Remove, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- Log.d("profiles", String.format("[fragment] removing profile %s", mProfile.getUuid()));
+ Log.d("profiles",
+ String.format("[fragment] removing profile %s", mProfile.getUuid()));
mProfile.removeFromDB();
Data.profiles.remove(mProfile);
if (Data.profile.get().equals(mProfile)) {
if (isChecked) userName.requestFocus();
});
- preferredAccountsFilter.setText(mProfile.getPreferredAccountsFilter());
postingPermitted.setOnCheckedChangeListener(((buttonView, isChecked) -> {
preferredAccountsFilterLayout.setVisibility(isChecked ? View.VISIBLE : View.GONE);
}));
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 {
authParams.setVisibility(View.GONE);
userName.setText("");
password.setText("");
+ preferredAccountsFilter.setText(null);
profileThemeId = -1;
}