mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-03 15:46:34 +02:00
Some context
This commit is contained in:
@@ -3169,7 +3169,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
if (BuildConfig.DEBUG)
|
||||
for (Element struct : document.select("script[type=application/ld+json]"))
|
||||
try {
|
||||
document.body().append(new StructuredEmail(struct.html()).getHtml());
|
||||
document.body().append(new StructuredEmail(struct.html()).getHtml(context));
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ package eu.faircode.email;
|
||||
Copyright 2018-2023 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -36,9 +38,10 @@ public class StructuredEmail {
|
||||
jroot = new JSONObject(json);
|
||||
}
|
||||
|
||||
public String getHtml() throws JSONException {
|
||||
public String getHtml(Context context) throws JSONException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
getHtml(jroot, 0, sb);
|
||||
|
||||
Document d = Document.createShell("");
|
||||
d.appendElement("pre")
|
||||
.attr("style", "font-size: smaller !important;")
|
||||
|
||||
Reference in New Issue
Block a user