Revert "Added fail-safe"

This reverts commit 210d8b717b.
pull/214/head
M66B 2 years ago
parent 8262ba961e
commit 6044d9f57a

@ -41,7 +41,6 @@ public class StructuredEmail {
} }
public String getHtml(Context context) throws JSONException { public String getHtml(Context context) throws JSONException {
try {
String title; String title;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -167,23 +166,16 @@ public class StructuredEmail {
} }
Document d = Document.createShell(""); Document d = Document.createShell("");
d.body().appendElement("hr"); d.appendElement("hr");
d.body().appendElement("div") d.appendElement("div")
.attr("style", "font-size: larger !important;") .attr("style", "font-size: larger !important;")
.text(title); .text(title);
d.body().appendElement("br"); d.appendElement("br");
d.body().appendElement("div") d.appendElement("div")
.attr("style", "font-size: smaller !important;") .attr("style", "font-size: smaller !important;")
.html(HtmlHelper.formatPlainText(sb.toString())); .html(HtmlHelper.formatPlainText(sb.toString()));
d.body().appendElement("hr"); d.appendElement("hr");
return d.body().html(); return d.html();
} catch (Throwable ex) {
Log.e(ex);
Document d = Document.createShell("");
d.body().appendElement("pre").text(Log.formatThrowable(ex, false));
return d.body().html();
}
} }
private void getHtml(Object obj, int indent, StringBuilder sb) throws JSONException { private void getHtml(Object obj, int indent, StringBuilder sb) throws JSONException {

Loading…
Cancel
Save