Force a valid boolean value if server sent an invalid one
(such as blank) (cherry picked from commit b80654b361a82d6266180bd0b4910a0125668a4d)
This commit is contained in:
parent
3975c0befa
commit
d32bcc6c61
1 changed files with 3 additions and 1 deletions
|
@ -2085,7 +2085,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
|||
binding.label.setText(field.getLabel().or(""));
|
||||
setTextOrHide(binding.desc, field.getDesc());
|
||||
mValue = field.getValue();
|
||||
binding.checkbox.setChecked(mValue.getContent() != null && (mValue.getContent().equals("true") || mValue.getContent().equals("1")));
|
||||
final var isChecked = mValue.getContent() != null && (mValue.getContent().equals("true") || mValue.getContent().equals("1"));
|
||||
mValue.setContent(isChecked ? "true" : "false");
|
||||
binding.checkbox.setChecked(isChecked);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue