mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Remove successive block quotes
This commit is contained in:
parent
4191add06f
commit
98fcae971b
1 changed files with 10 additions and 2 deletions
|
@ -2216,8 +2216,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
// Collapse quotes
|
||||
if (!show_quotes) {
|
||||
for (Element quote : document.select("blockquote"))
|
||||
quote.html("…");
|
||||
List<Element> succesive = new ArrayList<>();
|
||||
for (Element quote : document.select("blockquote")) {
|
||||
Element next = quote.nextElementSibling();
|
||||
if (next != null && "blockquote".equals(next.tagName()))
|
||||
succesive.add(quote);
|
||||
else
|
||||
quote.html("…");
|
||||
}
|
||||
for (Element quote : succesive)
|
||||
quote.remove();
|
||||
}
|
||||
|
||||
// Draw images
|
||||
|
|
Loading…
Reference in a new issue