Added message link to shared HTML

This commit is contained in:
M66B 2021-04-11 15:20:45 +02:00
parent be4dd07967
commit 8ce819057a
1 changed files with 10 additions and 1 deletions

View File

@ -4819,7 +4819,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
String html = Helper.readText(file);
String text = HtmlHelper.getText(context, html);
result.put("html", html);
Document document = JsoupEx.parse(html);
Element a = document.createElement("a");
a.text(context.getString(R.string.app_name));
a.attr("href", "message://" + BuildConfig.APPLICATION_ID + "/" + message.id);
document.body().appendElement("p").appendChild(a);
result.put("html", document.body().html());
if (!TextUtils.isEmpty(text))
result.put("text", text);