Added fail safe

pull/199/head
M66B 4 years ago
parent 84c3741dee
commit d17ef51361

@ -2781,13 +2781,12 @@ 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)
tvCalendarDescription.setText(description);
else
tvCalendarDescription.setText(
HtmlHelper.fromDocument(context, d, null, null));
try {
tvCalendarDescription.setText(HtmlHelper.fromHtml(description, context));
} catch (Throwable ex) {
Log.w(ex);
tvCalendarDescription.setText(description);
}
tvCalendarDescription.setVisibility(TextUtils.isEmpty(description) ? View.GONE : View.VISIBLE);

Loading…
Cancel
Save