mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-03 07:36:31 +02:00
Simplification
This commit is contained in:
@@ -503,7 +503,7 @@ public class HtmlHelper {
|
||||
break;
|
||||
|
||||
case "padding-top":
|
||||
if (element.isBlock()) {
|
||||
if (element.isBlock() && hasVisibleContent(element.childNodes())) {
|
||||
Float pt = getFontSize(value, null);
|
||||
if (pt != null && pt >= 0.5)
|
||||
element.attr("line", "before");
|
||||
@@ -511,7 +511,7 @@ public class HtmlHelper {
|
||||
break;
|
||||
|
||||
case "padding-bottom":
|
||||
if (element.isBlock()) {
|
||||
if (element.isBlock() && hasVisibleContent(element.childNodes())) {
|
||||
Float pb = getFontSize(value, null);
|
||||
if (pb != null && pb >= 0.5)
|
||||
element.attr("line", "after");
|
||||
@@ -798,12 +798,10 @@ public class HtmlHelper {
|
||||
for (Element div : document.select("div"))
|
||||
div.tagName("span");
|
||||
|
||||
for (Element e : document.select("*[line=before]"))
|
||||
if (hasVisibleContent(e.childNodes()))
|
||||
for (Element e : document.select("*[line]"))
|
||||
if ("before".equals(e.attr("line")))
|
||||
e.prependElement("br");
|
||||
|
||||
for (Element e : document.select("*[line=after]"))
|
||||
if (hasVisibleContent(e.childNodes()))
|
||||
else
|
||||
e.appendElement("br");
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
|
||||
|
||||
Reference in New Issue
Block a user