mirror of https://github.com/M66B/FairEmail.git
Fixed default font color
This commit is contained in:
parent
1368bbe87c
commit
2d675ec921
|
@ -964,10 +964,7 @@ public class MessageHelper {
|
||||||
HtmlHelper.autoLink(document, true);
|
HtmlHelper.autoLink(document, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compose_color != Color.TRANSPARENT)
|
if (!TextUtils.isEmpty(compose_font) || compose_color != Color.TRANSPARENT) {
|
||||||
document.head().append("<style>* {color: " + HtmlHelper.encodeWebColor(compose_color) + ";}</style>");
|
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(compose_font)) {
|
|
||||||
List<Node> childs = new ArrayList<>();
|
List<Node> childs = new ArrayList<>();
|
||||||
for (Node child : document.body().childNodes())
|
for (Node child : document.body().childNodes())
|
||||||
if (TextUtils.isEmpty(child.attr("fairemail"))) {
|
if (TextUtils.isEmpty(child.attr("fairemail"))) {
|
||||||
|
@ -976,8 +973,14 @@ public class MessageHelper {
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Element div = document.createElement("div").attr("style",
|
StringBuilder style = new StringBuilder();
|
||||||
"font-family:" + StyleHelper.getFamily(compose_font));
|
if (!TextUtils.isEmpty(compose_font))
|
||||||
|
style.append("font-family: ").append(StyleHelper.getFamily(compose_font)).append(';');
|
||||||
|
if (compose_color != Color.TRANSPARENT)
|
||||||
|
style.append("color: ").append(HtmlHelper.encodeWebColor(compose_color)).append(';');
|
||||||
|
|
||||||
|
Element div = document.createElement("div").attr("style", style.toString());
|
||||||
|
|
||||||
for (Node child : childs)
|
for (Node child : childs)
|
||||||
div.appendChild(child);
|
div.appendChild(child);
|
||||||
document.body().prependChild(div);
|
document.body().prependChild(div);
|
||||||
|
|
Loading…
Reference in New Issue