1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Changed shared link title

This commit is contained in:
M66B 2022-07-21 16:03:07 +02:00
parent f57ab8e363
commit 9949c8e7f5
2 changed files with 6 additions and 2 deletions

View file

@ -6364,13 +6364,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (!TextUtils.isEmpty(message.subject)) if (!TextUtils.isEmpty(message.subject))
result.put("subject", message.subject); result.put("subject", message.subject);
String link = "message://email.faircode.eu/link/#" + message.id; String link = message.getLink();
Document document = JsoupEx.parse(file); Document document = JsoupEx.parse(file);
HtmlHelper.truncate(document, HtmlHelper.MAX_SHARE_TEXT_SIZE); HtmlHelper.truncate(document, HtmlHelper.MAX_SHARE_TEXT_SIZE);
Element a = document.createElement("a"); Element a = document.createElement("a");
a.text(context.getString(R.string.app_name)); a.text(link);
a.attr("href", link); a.attr("href", link);
document.body().appendElement("p").appendChild(a); document.body().appendElement("p").appendChild(a);

View file

@ -261,6 +261,10 @@ public class EntityMessage implements Serializable {
return "<" + UUID.randomUUID() + "@" + domain + '>'; return "<" + UUID.randomUUID() + "@" + domain + '>';
} }
String getLink() {
return "message://email.faircode.eu/link/#" + id;
}
boolean isPlainOnly() { boolean isPlainOnly() {
return (this.plain_only != null && (this.plain_only & 1) != 0); return (this.plain_only != null && (this.plain_only & 1) != 0);
} }