mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 00:53:26 +02:00
Refactoring
This commit is contained in:
@@ -1989,6 +1989,20 @@ public class HtmlHelper {
|
||||
}
|
||||
}
|
||||
|
||||
static void quoteLimit(Document d, int maxLevel) {
|
||||
for (Element bq : d.select("blockquote")) {
|
||||
int level = 1;
|
||||
Element parent = bq.parent();
|
||||
while (parent != null) {
|
||||
if ("blockquote".equals(parent.tagName()))
|
||||
level++;
|
||||
parent = parent.parent();
|
||||
}
|
||||
if (level >= maxLevel)
|
||||
bq.html("…");
|
||||
}
|
||||
}
|
||||
|
||||
static boolean truncate(Document d, int max) {
|
||||
final int[] length = new int[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user