1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 06:31:17 +00:00

Added fail safe

This commit is contained in:
M66B 2021-06-01 17:08:19 +02:00
parent 84c3741dee
commit d17ef51361

View file

@ -2781,14 +2781,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (description == null)
tvCalendarDescription.setText(description);
else {
Document d = JsoupEx.parse(description);
if (d.selectFirst("html") == null)
else
try {
tvCalendarDescription.setText(HtmlHelper.fromHtml(description, context));
} catch (Throwable ex) {
Log.w(ex);
tvCalendarDescription.setText(description);
else
tvCalendarDescription.setText(
HtmlHelper.fromDocument(context, d, null, null));
}
}
tvCalendarDescription.setVisibility(TextUtils.isEmpty(description) ? View.GONE : View.VISIBLE);
tvCalendarLocation.setText(location);