Prevent crash

pull/162/head 1.711
M66B 5 years ago
parent 454f113478
commit df2005dfc1

@ -3674,6 +3674,11 @@ public class FragmentCompose extends FragmentBase {
db.message().liveMessage(id).observe(getViewLifecycleOwner(), new Observer<TupleMessageEx>() {
@Override
public void onChanged(TupleMessageEx draft) {
if (draft == null) {
dismiss();
return;
}
int plus = (draft.cc == null ? 0 : draft.cc.length) +
(draft.bcc == null ? 0 : draft.bcc.length);
tvTo.setText(MessageHelper.formatAddressesShort(draft.to) + (plus > 0 ? " +" + plus : ""));

Loading…
Cancel
Save