1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-12 07:07:18 +00:00

Refactoring

This commit is contained in:
M66B 2023-11-28 12:29:08 +01:00
parent 7036d3b143
commit 66b5971847
5 changed files with 9 additions and 9 deletions

View file

@ -8,7 +8,7 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### Next version
* Basic support for [Structured Email](https://structured.email/)
* Basic support for [Linked Data](https://json-ld.org/)
* Small improvements and minor bug fixes
* Updated [translations](https://crowdin.com/project/open-source-email)

View file

@ -8,7 +8,7 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### Next version
* Basic support for [Structured Email](https://structured.email/)
* Basic support for [Linked Data](https://json-ld.org/)
* Small improvements and minor bug fixes
* Updated [translations](https://crowdin.com/project/open-source-email)

View file

@ -116,7 +116,6 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Group;
import androidx.core.app.ShareCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.graphics.ColorUtils;
import androidx.core.text.method.LinkMovementMethodCompat;
@ -146,7 +145,6 @@ import androidx.webkit.WebViewFeature;
import com.google.android.material.snackbar.Snackbar;
import org.json.JSONObject;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@ -3170,7 +3168,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (json_ld)
for (Element struct : document.select("script[type=application/ld+json]"))
try {
document.body().append(new StructuredEmail(struct.html()).getHtml(context));
document.body().append(new JsonLd(struct.html()).getHtml(context));
} catch (Throwable ex) {
Log.w(ex);
}

View file

@ -29,13 +29,15 @@ import org.jsoup.nodes.Element;
import java.util.Iterator;
// https://structured.email/content/introduction/getting_started.html
// https://json-ld.org/
// https://schema.org/
// https://schema.org/FlightReservation
// https://structured.email/content/introduction/getting_started.html
public class StructuredEmail {
public class JsonLd {
private final JSONObject jroot;
public StructuredEmail(String json) throws JSONException {
public JsonLd(String json) throws JSONException {
jroot = new JSONObject(json);
}

View file

@ -8,7 +8,7 @@ Vallibonavenatrix
Next version
* Basic support for Structured Email
* Basic support for Linked Data
* Small improvements and minor bug fixes
* Updated translations