Properly show signatures

pull/209/head
M66B 3 years ago
parent c0cdee0f62
commit bd75f2774a

@ -7270,8 +7270,10 @@ public class FragmentCompose extends FragmentBase {
grpExtra.setVisibility(identity != null && identity.sender_extra ? View.VISIBLE : View.GONE); grpExtra.setVisibility(identity != null && identity.sender_extra ? View.VISIBLE : View.GONE);
Spanned signature = null; Spanned signature = null;
if (identity != null && !TextUtils.isEmpty(identity.signature)) if (identity != null && !TextUtils.isEmpty(identity.signature)) {
signature = HtmlHelper.fromHtml(identity.signature, new HtmlHelper.ImageGetterEx() { Document d = JsoupEx.parse(identity.signature);
d = HtmlHelper.sanitizeView(getContext(), d, show_images);
signature = HtmlHelper.fromDocument(getContext(), d, new HtmlHelper.ImageGetterEx() {
@Override @Override
public Drawable getDrawable(Element element) { public Drawable getDrawable(Element element) {
String source = element.attr("src"); String source = element.attr("src");
@ -7280,7 +7282,8 @@ public class FragmentCompose extends FragmentBase {
return ImageHelper.decodeImage(getContext(), return ImageHelper.decodeImage(getContext(),
working, element, true, 0, 1.0f, tvSignature); working, element, true, 0, 1.0f, tvSignature);
} }
}, null, getContext()); }, null);
}
tvSignature.setText(signature); tvSignature.setText(signature);
grpSignature.setVisibility(signature == null ? View.GONE : View.VISIBLE); grpSignature.setVisibility(signature == null ? View.GONE : View.VISIBLE);

Loading…
Cancel
Save