mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Remove blockquotes when not showing quotes
This commit is contained in:
parent
a2f0e4f78c
commit
0b6be960fc
1 changed files with 8 additions and 0 deletions
|
@ -105,6 +105,7 @@ import com.google.android.material.snackbar.Snackbar;
|
||||||
|
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
|
import org.jsoup.nodes.Element;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
@ -1731,6 +1732,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
return null;
|
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);
|
Spanned html = decodeHtml(context, message, body);
|
||||||
|
|
||||||
SpannableStringBuilder builder = new SpannableStringBuilder(html);
|
SpannableStringBuilder builder = new SpannableStringBuilder(html);
|
||||||
|
|
Loading…
Reference in a new issue