Remove blockquotes when not showing quotes

pull/156/head
M66B 6 years ago
parent a2f0e4f78c
commit 0b6be960fc

@ -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("&#8230;");
body = document.html();
}
Spanned html = decodeHtml(context, message, body);
SpannableStringBuilder builder = new SpannableStringBuilder(html);

Loading…
Cancel
Save