mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Remove blockquotes when not showing quotes
This commit is contained in:
@@ -105,6 +105,7 @@ import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -1731,6 +1732,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!show_quotes) {
|
||||
Document document = Jsoup.parse(body);
|
||||
for (Element quote : document.select("blockquote"))
|
||||
quote.html("…");
|
||||
body = document.html();
|
||||
}
|
||||
|
||||
Spanned html = decodeHtml(context, message, body);
|
||||
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(html);
|
||||
|
||||
Reference in New Issue
Block a user