mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-30 00:39:59 +01:00
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
a34e95f987
commit
aa6cf96917
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(""));
|
binding.label.setText(field.getLabel().or(""));
|
||||||
setTextOrHide(binding.desc, field.getDesc());
|
setTextOrHide(binding.desc, field.getDesc());
|
||||||
mValue = field.getValue();
|
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
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue