1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Prevent crash

This commit is contained in:
M66B 2019-09-18 12:02:39 +02:00
parent 454f113478
commit df2005dfc1

View file

@ -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 : ""));