Optional from HTML compression

This commit is contained in:
M66B
2020-06-28 21:23:33 +02:00
parent e4958c0874
commit ea4e40c079
11 changed files with 41 additions and 40 deletions

View File

@@ -1966,7 +1966,7 @@ public class FragmentCompose extends FragmentBase {
args.putInt("start", start);
// TODO: double conversion
return HtmlHelper.fromHtml(HtmlHelper.toHtml(s, getContext()), new Html.ImageGetter() {
return HtmlHelper.fromHtml(HtmlHelper.toHtml(s, getContext()), false, new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
return ImageHelper.decodeImage(context, id, source, true, zoom, etBody);
@@ -2754,7 +2754,7 @@ public class FragmentCompose extends FragmentBase {
String html = EntityAnswer.replacePlaceholders(answer, to);
Spanned spanned = HtmlHelper.fromHtml(html, new Html.ImageGetter() {
Spanned spanned = HtmlHelper.fromHtml(html, false, new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
return ImageHelper.decodeImage(getContext(), working, source, true, zoom, etBody);
@@ -4630,7 +4630,7 @@ public class FragmentCompose extends FragmentBase {
Elements ref = doc.select("div[fairemail=reference]");
ref.remove();
Spanned spannedBody = HtmlHelper.fromDocument(context, doc, new Html.ImageGetter() {
Spanned spannedBody = HtmlHelper.fromDocument(context, doc, false, new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
return ImageHelper.decodeImage(context, id, source, true, zoom, etBody);
@@ -4658,7 +4658,7 @@ public class FragmentCompose extends FragmentBase {
if (!ref.isEmpty()) {
Document dref = JsoupEx.parse(ref.outerHtml());
Document quote = HtmlHelper.sanitizeView(context, dref, show_images);
spannedRef = HtmlHelper.fromDocument(context, quote,
spannedRef = HtmlHelper.fromDocument(context, quote, true,
new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
@@ -4755,7 +4755,7 @@ public class FragmentCompose extends FragmentBase {
Spanned signature = null;
if (identity != null && !TextUtils.isEmpty(identity.signature))
signature = HtmlHelper.fromHtml(identity.signature, new Html.ImageGetter() {
signature = HtmlHelper.fromHtml(identity.signature, false, new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
return ImageHelper.decodeImage(getContext(), working, source, true, 0, tvSignature);